Merge 16198a3306 into 4de0bae45a
This commit is contained in:
commit
5a82b8e97d
@ -398,7 +398,10 @@ export class CallManager {
|
||||
}
|
||||
|
||||
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";
|
||||
this.persistCallRecord(call);
|
||||
|
||||
@ -352,7 +352,10 @@ export class VoiceCallWebhookServer {
|
||||
|
||||
if (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) {
|
||||
console.error(`[voice-call] Auto-response error:`, err);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user