Flux TTS returns audio with multi-second embedded silences on build 2026-08-12.0 #1683
Flux TTS websocket intermittently inserts multi-second silences into the audio (model_version 2026-08-12.0)SummaryThe The Environment
DataTen consecutive connections,
Run 7 is the failure mode: 7.9 of its 14.2 seconds are silence, including one 4.6s gap in the middle of the sentence. The An earlier batch the same day showed the same split: six connections on Batch REST requests to How it sounds: Repro# pip install aiohttp; DEEPGRAM_API_KEY=... python repro.py
import array, asyncio, json, os
import aiohttp
TEXT = ("Thanks for calling! I can help you with scheduling, billing "
"questions, or connecting you to a technician. What can I do "
"for you today?")
RATE = 48000
async def once(i):
url = ("wss://api.deepgram.com/v2/speak"
f"?model=flux-haley-en&encoding=linear16&sample_rate={RATE}")
audio = bytearray()
version = req = "?"
async with aiohttp.ClientSession() as s:
headers = {"Authorization": f"Token {os.environ['DEEPGRAM_API_KEY']}"}
async with s.ws_connect(url, headers=headers) as ws:
for w in TEXT.split():
await ws.send_str(json.dumps({"type": "Speak", "text": w + " "}))
await ws.send_str(json.dumps({"type": "Flush"}))
while True:
msg = await asyncio.wait_for(ws.receive(), timeout=30)
if msg.type == aiohttp.WSMsgType.BINARY:
audio.extend(msg.data)
elif msg.type == aiohttp.WSMsgType.TEXT:
d = json.loads(msg.data)
if d.get("type") == "Connected":
version, req = d.get("model_version"), d.get("request_id")
elif d.get("type") == "SpeechMetadata":
break
samples = array.array("h", bytes(audio))
win = RATE // 50
quiet = sum(
1 for j in range(len(samples) // win)
if max(abs(x) for x in samples[j * win:(j + 1) * win]) < 300
)
print(f"run {i}: build={version} audio={len(samples)/RATE:.2f}s "
f"silence={quiet/50:.2f}s request_id={req}")
async def main():
for i in range(10):
await once(i + 1)
asyncio.run(main())Ten runs are usually enough to catch at least one bad one. I can attach WAV captures of the pathological runs if useful (I kept the raw PCM for run 7 above). Questions
|
Replies: 4 comments 1 reply
|
Thanks for asking your question. Please be sure to reply with as much detail as possible so the community can assist you efficiently. |
|
Hey there! It looks like you haven't connected your GitHub account to your Deepgram account. You can do this at https://community.deepgram.com - being verified through this process will allow our team to help you in a much more streamlined fashion. |
|
We see the same on On one connection, the first turn starts after 0.1-0.4 s, but after a turn completes, later turns usually start with 1-4 s of near-silence (5 of 6 and 9 of 10 connections in two batches), and the connection stays in that state. It does not scale with the idle gap between turns (0, 2, 10, 30 s all similar). A new connection per turn gives 0.00-0.39 s on 12 of 12 turns. Interrupt, Configure, ping keepalive, We have emailed Deepgram support with the full repro. Asking here too: can clients pin a build, or can 2026-08-12.0 be rolled back? |
|
Hello @false-vacuum, Thank you for the detailed report and the reproduction artefacts. I apologise that this went unanswered for so long. Engineering has reproduced this issue, and work on a fix is in progress. I do not have a release date, and I will update this discussion when I have news that I am permitted to share. Answers to your questions:
|
Hello @false-vacuum,
Thank you for the detailed report and the reproduction artefacts. I apologise that this went unanswered for so long.
Engineering has reproduced this issue, and work on a fix is in progress. I do not have a release date, and I will update this discussion when I have news that I am permitted to share.
Answers to your questions:
versionparameter applies to Nova only, which is whymodel,versionandmodel_versionreturned HTTP 400 for you. TheConnectedmessage reports the resolvedmodel_version, but you ca…