AudioSocket was delivering 16kHz audio despite the telecom-kz trunk being codec-restricted to alaw/ulaw, causing the 8k->16k ASR resample to double an already-16kHz stream to an effective 32kHz labeled as 16000 Hz - audible as slow, deep-pitched, unintelligible speech. Force audioread/writeformat=slin before AudioSocket() so the channel always delivers narrowband 8kHz, matching every rate assumption in the runtime. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -28,6 +28,8 @@ exten => ai-reuse,1,NoOp(MVPCC AI handoff reusing active IVR call)
|
||||
|
||||
exten => ai-audiosocket,1,NoOp(MVPCC AI audio bridge start)
|
||||
same => n,GotoIf($["${MVPCC_AI_AUDIOSOCKET_SERVICE}" = ""]?ai-human-fallback,1)
|
||||
same => n,Set(CHANNEL(audioreadformat)=slin)
|
||||
same => n,Set(CHANNEL(audiowriteformat)=slin)
|
||||
same => n,Set(MVPCC_MEDIA_UUID=${SHELL(uuidgen | tr -d '\r\n')})
|
||||
same => n,UserEvent(MVPCCAIAudioBridgeRequested,CallID:${MVPCC_CALL_ID},LinkedID:${MVPCC_LINKED_ID},QueueCode:${MVPCC_QUEUE},Extension:${MVPCC_ENTRY_EXTENSION},Context:${CONTEXT},MediaUUID:${MVPCC_MEDIA_UUID},UuidLen:${LEN(${MVPCC_MEDIA_UUID})},AudioSocketService:${MVPCC_AI_AUDIOSOCKET_SERVICE},Channel:${CHANNEL})
|
||||
same => n,UserEvent(MVPCCAIAudioSocketAttempt,CallID:${MVPCC_CALL_ID},LinkedID:${MVPCC_LINKED_ID},QueueCode:${MVPCC_QUEUE},Extension:${MVPCC_ENTRY_EXTENSION},Context:${CONTEXT},MediaUUID:${MVPCC_MEDIA_UUID},UuidLen:${LEN(${MVPCC_MEDIA_UUID})},AudioSocketService:${MVPCC_AI_AUDIOSOCKET_SERVICE},Channel:${CHANNEL})
|
||||
|
||||
Reference in New Issue
Block a user