Spaces:
Building
Building
Update flare-ui/src/app/services/conversation-manager.service.ts
Browse files
flare-ui/src/app/services/conversation-manager.service.ts
CHANGED
@@ -298,16 +298,23 @@ export class ConversationManagerService implements OnDestroy {
|
|
298 |
break;
|
299 |
|
300 |
case 'stt_ready':
|
301 |
-
console.log('✅ [ConversationManager] STT ready signal received'
|
|
|
|
|
|
|
|
|
302 |
|
303 |
// ✅ STT hazır, recording'i başlat
|
304 |
-
if (
|
|
|
305 |
this.audioService.startRecording().then(() => {
|
306 |
-
console.log('
|
307 |
}).catch(error => {
|
308 |
console.error('❌ Failed to start recording:', error);
|
309 |
this.handleAudioError(error);
|
310 |
});
|
|
|
|
|
311 |
}
|
312 |
break;
|
313 |
|
|
|
298 |
break;
|
299 |
|
300 |
case 'stt_ready':
|
301 |
+
console.log('✅ [ConversationManager] STT ready signal received', {
|
302 |
+
hasReadyFlag: !!message['ready_for_audio'],
|
303 |
+
isRecording: this.audioService.isRecording(),
|
304 |
+
currentState: this.currentStateSubject.value
|
305 |
+
});
|
306 |
|
307 |
// ✅ STT hazır, recording'i başlat
|
308 |
+
if (!this.audioService.isRecording()) {
|
309 |
+
console.log('🎤 [ConversationManager] Starting audio recording (STT ready)');
|
310 |
this.audioService.startRecording().then(() => {
|
311 |
+
console.log('✅ [ConversationManager] Audio recording started successfully');
|
312 |
}).catch(error => {
|
313 |
console.error('❌ Failed to start recording:', error);
|
314 |
this.handleAudioError(error);
|
315 |
});
|
316 |
+
} else {
|
317 |
+
console.log('⚠️ [ConversationManager] Recording already active');
|
318 |
}
|
319 |
break;
|
320 |
|