cli icon indicating copy to clipboard operation
cli copied to clipboard

[bug] speech synthesize --timeout 180 does not terminate stalled audio streaming

Open luodalu0003 opened this issue 3 weeks ago • 0 comments

Environment

  • CLI / bailian-gen / bailian-protocol: 2.8.4 (updated from 2.8.3 using the official updater before the run)
  • Platform: macOS 27.2, arm64; standalone native CLI binary (no external Node runtime)
  • Host: Codex; existing authorization worked for earlier synthesis chunks

Command (redacted)

bl speech synthesize --model cosyvoice-v3-flash --voice longanwen_v3 --rate 1.0 --pitch 1.0 --volume 50 --format wav --sample-rate 24000 --enable-ssml --text-file [REDACTED_LOCAL_SSML] --out [REDACTED_LOCAL_WAV] --output json --timeout 180

Expected

The command should complete successfully or return a structured timeout within the configured deadline, clearly marking an incomplete WAV as incomplete.

Observed

During a sequential Chinese TTS batch, one invocation remained running for at least 5m43s despite --timeout 180. Its WAV stopped at 540,995 bytes (11.2698 seconds of actual 24kHz mono PCM), far too short for the requested passage. The RIFF/data length fields were streaming placeholders. The parent was reading stdout/stderr via subprocess capture_output, so the output pipe was drained. No actionable error or request ID was available. The stuck child was then terminated; the incomplete audio and checkpoint were retained locally. The service-side billing/completion status is unknown; no claim is made about server cancellation. Re-generating that passage after checking the incomplete file completed normally. This report excludes user text, account information, credentials, internal addresses, and raw logs.

Frequency

Intermittent; a second invocation with the same configuration also stalled and was stopped by an external 240-second deadline. Its partial PCM lasted 13.3951 seconds; other chunks using identical parameters completed. A subsequent invocation completed after a long delay but within the external deadline. No extra paid diagnostic calls were made.

Suggested area to inspect

Whether the configured timeout covers the whole speech streaming/read loop, rather than only connection establishment, and how interrupted streaming output is finalized or flagged.

luodalu0003 avatar Nov 08 '26 01:11 luodalu0003