Make speech streaming default to SSE (#4679)
Signed-off-by: syd520zy <529477025@qq.com>
This commit is contained in:
1 parent
c45ac74d43
commit
11f6a0b72e
39 files changed
+146
-58
No files matched your search
@@ -66,6 +66,8 @@ def build_payload(
|
||||
"response_format": "pcm" if stream else response_format,
|
||||
"stream": stream,
|
||||
}
|
||||
if stream:
|
||||
payload["stream_format"] = "audio"
|
||||
|
||||
# Voice cloning: ref_audio takes priority over URL.
|
||||
ref_url_stripped = ref_audio_url.strip() if ref_audio_url else ""
|
||||
|
||||
@@ -53,6 +53,7 @@ def run_tts(args) -> None:
|
||||
|
||||
if args.stream:
|
||||
payload["stream"] = True
|
||||
payload["stream_format"] = "audio"
|
||||
payload["response_format"] = "pcm"
|
||||
|
||||
print(f"Model: {args.model}")
|
||||
|
||||
Reference in new issue
Block a user