ciyidogan commited on
Commit
0a13b97
·
verified ·
1 Parent(s): adb4c52

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

Browse files
flare-ui/src/app/components/environment/environment.component.ts CHANGED
@@ -12,7 +12,7 @@ import { MatSnackBar, MatSnackBarModule } from '@angular/material/snack-bar';
12
  import { MatExpansionModule } from '@angular/material/expansion';
13
  import { MatSliderModule } from '@angular/material/slider';
14
  import { MatCheckboxModule } from '@angular/material/checkbox';
15
- import { ApiService, Environment, STTSettings } from '../../services/api.service';
16
  import { EnvironmentService } from '../../services/environment.service';
17
 
18
  @Component({
@@ -52,7 +52,7 @@ export class EnvironmentComponent implements OnInit {
52
  stt_engine_api_key: ''
53
  };
54
 
55
- ttsSettings: any = {
56
  use_ssml: false
57
  };
58
 
@@ -81,6 +81,11 @@ export class EnvironmentComponent implements OnInit {
81
  next: (env) => {
82
  this.environment = env;
83
 
 
 
 
 
 
84
  // Load STT settings or use defaults
85
  if (env.stt_settings) {
86
  this.sttSettings = { ...this.sttSettings, ...env.stt_settings };
 
12
  import { MatExpansionModule } from '@angular/material/expansion';
13
  import { MatSliderModule } from '@angular/material/slider';
14
  import { MatCheckboxModule } from '@angular/material/checkbox';
15
+ import { ApiService, Environment, STTSettings, TTSSettings } from '../../services/api.service';
16
  import { EnvironmentService } from '../../services/environment.service';
17
 
18
  @Component({
 
52
  stt_engine_api_key: ''
53
  };
54
 
55
+ ttsSettings: TTSSettings = {
56
  use_ssml: false
57
  };
58
 
 
81
  next: (env) => {
82
  this.environment = env;
83
 
84
+ // Load TTS settings or use defaults
85
+ if (env.tts_settings) {
86
+ this.ttsSettings = { ...this.ttsSettings, ...env.tts_settings };
87
+ }
88
+
89
  // Load STT settings or use defaults
90
  if (env.stt_settings) {
91
  this.sttSettings = { ...this.sttSettings, ...env.stt_settings };