This commit is contained in:
hcl 2026-01-30 13:42:03 +09:00 committed by GitHub
commit 5a82b8e97d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 8 additions and 2 deletions

View File

@ -398,7 +398,10 @@ export class CallManager {
} }
try { try {
await this.speak(callId, prompt); const speakResult = await this.speak(callId, prompt);
if (!speakResult.success) {
return { success: false, error: speakResult.error || "Failed to speak prompt" };
}
call.state = "listening"; call.state = "listening";
this.persistCallRecord(call); this.persistCallRecord(call);

View File

@ -352,7 +352,10 @@ export class VoiceCallWebhookServer {
if (result.text) { if (result.text) {
console.log(`[voice-call] AI response: "${result.text}"`); console.log(`[voice-call] AI response: "${result.text}"`);
await this.manager.speak(callId, result.text); const speakResult = await this.manager.speak(callId, result.text);
if (!speakResult.success) {
console.error(`[voice-call] Failed to speak: ${speakResult.error}`);
}
} }
} catch (err) { } catch (err) {
console.error(`[voice-call] Auto-response error:`, err); console.error(`[voice-call] Auto-response error:`, err);