ciyidogan commited on
Commit
28a8408
·
verified ·
1 Parent(s): fb0f303

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

Browse files
flare-ui/src/app/components/chat/chat.component.ts CHANGED
@@ -138,7 +138,7 @@ export class ChatComponent implements OnInit, OnDestroy, AfterViewChecked {
138
  takeUntil(this.destroyed$)
139
  ).subscribe({
140
  next: (env) => {
141
- this.sttAvailable = env.stt_engine !== 'no_stt';
142
  if (!this.sttAvailable) {
143
  this.useSTT = false;
144
  }
@@ -264,7 +264,7 @@ export class ChatComponent implements OnInit, OnDestroy, AfterViewChecked {
264
  takeUntil(this.destroyed$)
265
  ).subscribe(env => {
266
  if (env) {
267
- this.ttsAvailable = env.tts_engine !== 'no_tts';
268
  if (!this.ttsAvailable) {
269
  this.useTTS = false;
270
  }
@@ -276,7 +276,7 @@ export class ChatComponent implements OnInit, OnDestroy, AfterViewChecked {
276
  takeUntil(this.destroyed$)
277
  ).subscribe({
278
  next: (env) => {
279
- this.ttsAvailable = env.tts_engine !== 'no_tts';
280
  if (!this.ttsAvailable) {
281
  this.useTTS = false;
282
  }
 
138
  takeUntil(this.destroyed$)
139
  ).subscribe({
140
  next: (env) => {
141
+ this.sttAvailable = env.stt_provider?.name !== 'no_stt';
142
  if (!this.sttAvailable) {
143
  this.useSTT = false;
144
  }
 
264
  takeUntil(this.destroyed$)
265
  ).subscribe(env => {
266
  if (env) {
267
+ this.ttsAvailable = env.tts_provider?.name !== 'no_tts';
268
  if (!this.ttsAvailable) {
269
  this.useTTS = false;
270
  }
 
276
  takeUntil(this.destroyed$)
277
  ).subscribe({
278
  next: (env) => {
279
+ this.ttsAvailable = env.tts_provider?.name !== 'no_tts';
280
  if (!this.ttsAvailable) {
281
  this.useTTS = false;
282
  }