Skip to content

Commit 4f43ee9

Browse files
fix(tts): qa sends its audio as WAV again
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 75fc980 commit 4f43ee9

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎scripts/tts/narrate.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -537,7 +537,7 @@ def qa_scene(lang, scene, lines):
537537
"or letters read wrongly, symbols read aloud, wrong language. Ignore punctuation and Chinese character variants that sound the same. "
538538
'Return JSON {"lines": [{"n": 1, "transcript": "...", "issues": ["..."]}, ...]}. Be strict but do not invent issues.'
539539
)
540-
body = {"contents": [{"parts": [{"inlineData": {"mimeType": mime, "data": audio}}, {"text": prompt}]}], "generationConfig": {"responseMimeType": "application/json"}}
540+
body = {"contents": [{"parts": [{"inlineData": {"mimeType": "audio/wav", "data": audio}}, {"text": prompt}]}], "generationConfig": {"responseMimeType": "application/json"}}
541541
res = post(f"https://generativelanguage.googleapis.com/v1beta/models/{LISTENER}:generateContent", body)
542542
try:
543543
r = json.loads(res["candidates"][0]["content"]["parts"][-1]["text"])["lines"]

0 commit comments

Comments
 (0)