fix(tts): gate auto reply by ENABLE_TTS; allow on-demand and manual playback
- Pipeline: skip _send_tts_audio only for non-manual when ENABLE_TTS=false; remove enable_tts early return from handle_tts_request_on_demand. - Tencent TTS: PrimaryLanguage/chunking follow user language preference only. - Expo: let manual tts_audio bypass late-segment playback gate after interrupt. - Docs: clarify ENABLE_TTS vs tts_request in api/.env.example and TTSProvider port. - Tests: add manual bypass cases; adjust pipeline language tests for en+Chinese text. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1238,7 +1238,10 @@ export default function ConversationScreen() {
|
||||
|
||||
const handleTtsSegment = useCallback(
|
||||
(p: TtsSegmentPayload) => {
|
||||
if (!ttsGate.current.shouldAcceptIncomingTts()) return;
|
||||
// 闸门用于丢弃「用户已打断后」迟到的自动 TTS;按需朗读 (manual) 是当前明确操作,必须放行。
|
||||
const allowByGate =
|
||||
p.manual === true || ttsGate.current.shouldAcceptIncomingTts();
|
||||
if (!allowByGate) return;
|
||||
const convId = id ?? '';
|
||||
const cosUrl = p.audioUrl?.trim();
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user