fix: return tts:tokens-result when tts:tokens command is missing id (#1548) (#1577)

_lccTtsTokens silently returned on a missing `id`, leaving the WS client with
no feedback — no tts:tokens-result, no audio, only a server-side info log.
Mirror the existing missing-`tokens` handling and reply with status 'failed' /
reason 'missing id' so callers that omit `id` (e.g. the Python SDK) get an
actionable result.
This commit is contained in:
Ben Younes
2026-09-09 15:54:07 +01:00
committed by GitHub
parent 83db903bc6
commit 1d1d16e221
3 changed files with 39 additions and 1 deletions
+4 -1
View File
@@ -1986,7 +1986,10 @@ Duration=${duration} `
if (id === undefined) {
this.logger.info({opts}, 'CallSession:_lccTtsTokens - invalid command since id is missing');
return;
return this.requestor.request('tts:tokens-result', '/tokens-result', {
status: 'failed',
reason: 'missing id'
}).catch((err) => this.logger.debug({err}, 'CallSession:_notifyTaskStatus - Error sending'));
}
else if (tokens === undefined) {
this.logger.info({opts}, 'CallSession:_lccTtsTokens - invalid command since tokens is missing');