ciyidogan commited on
Commit
092dfb6
·
verified ·
1 Parent(s): 5840fd9

Update flare-ui/src/app/components/environment/environment.component.ts

Browse files
flare-ui/src/app/components/environment/environment.component.ts CHANGED
@@ -742,40 +742,27 @@ export class EnvironmentComponent implements OnInit {
742
  }
743
 
744
  onSTTEngineChange() {
745
- console.log('onSTTEngineChange called with:', this.environment.stt_engine);
746
- console.log('Current stt_settings:', this.environment.stt_settings);
747
-
748
- try {
749
- if (this.environment.stt_engine === 'no_stt') {
750
- this.environment.stt_engine_api_key = '';
751
- this.sttSettingsExpanded = false;
752
- } else {
753
- // Debug log
754
- console.log('Setting up STT settings...');
755
-
756
- if (!this.environment.stt_settings) {
757
- console.log('Creating new stt_settings...');
758
- this.environment.stt_settings = {
759
- speech_timeout_ms: 2000,
760
- noise_reduction_level: 2,
761
- vad_sensitivity: 0.5,
762
- language: 'tr-TR',
763
- model: 'latest_long',
764
- use_enhanced: true,
765
- enable_punctuation: true,
766
- interim_results: true
767
- };
768
- }
769
- this.sttSettingsExpanded = true;
770
- console.log('STT settings after setup:', this.environment.stt_settings);
771
- }
772
- } catch (error) {
773
- console.error('Error in onSTTEngineChange:', error);
774
- if (error instanceof Error) {
775
- console.error('Stack trace:', error.stack);
776
- } else {
777
- console.error('Unknown error type:', error);
778
  }
 
 
 
 
779
  }
780
  }
781
 
 
742
  }
743
 
744
  onSTTEngineChange() {
745
+ if (this.environment.stt_engine === 'no_stt') {
746
+ this.environment.stt_engine_api_key = '';
747
+ this.sttSettingsExpanded = false;
748
+ } else {
749
+ // STT settings'i hemen oluştur
750
+ if (!this.environment.stt_settings) {
751
+ this.environment.stt_settings = {
752
+ speech_timeout_ms: 2000,
753
+ noise_reduction_level: 2,
754
+ vad_sensitivity: 0.5,
755
+ language: 'tr-TR',
756
+ model: 'latest_long',
757
+ use_enhanced: true,
758
+ enable_punctuation: true,
759
+ interim_results: true
760
+ };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
761
  }
762
+
763
+ setTimeout(() => {
764
+ this.sttSettingsExpanded = true;
765
+ }, 50);
766
  }
767
  }
768