ciyidogan commited on
Commit
3d47b64
·
verified ·
1 Parent(s): d6fce0a

Update flare-ui/src/app/services/conversation-manager.service.ts

Browse files
flare-ui/src/app/services/conversation-manager.service.ts CHANGED
@@ -251,7 +251,7 @@ export class ConversationManagerService implements OnDestroy {
251
  this.transcriptionSubject.next(message['text']);
252
  }
253
  break;
254
-
255
  case 'assistant_response':
256
  // Welcome mesajı veya normal yanıt
257
  const isWelcome = message['is_welcome'] || false;
@@ -266,6 +266,12 @@ export class ConversationManagerService implements OnDestroy {
266
  this.handleTTSAudio(message);
267
  break;
268
 
 
 
 
 
 
 
269
  case 'control':
270
  if (message['action'] === 'stop_playback') {
271
  this.stopAudioPlayback();
@@ -300,7 +306,7 @@ export class ConversationManagerService implements OnDestroy {
300
  timestamp: new Date()
301
  });
302
  }
303
- }
304
 
305
  private handleStateChange(from: string, to: string): void {
306
  console.log(`📊 State: ${from} → ${to}`);
 
251
  this.transcriptionSubject.next(message['text']);
252
  }
253
  break;
254
+
255
  case 'assistant_response':
256
  // Welcome mesajı veya normal yanıt
257
  const isWelcome = message['is_welcome'] || false;
 
266
  this.handleTTSAudio(message);
267
  break;
268
 
269
+ case 'tts_error':
270
+ // TTS hatası durumunda kullanıcıya bilgi ver
271
+ console.error('TTS Error:', message['message']);
272
+ this.addSystemMessage(message['message']);
273
+ break;
274
+
275
  case 'control':
276
  if (message['action'] === 'stop_playback') {
277
  this.stopAudioPlayback();
 
306
  timestamp: new Date()
307
  });
308
  }
309
+ }
310
 
311
  private handleStateChange(from: string, to: string): void {
312
  console.log(`📊 State: ${from} → ${to}`);