xtts-streaming-server
xtts-streaming-server copied to clipboard
Streaming input to streaming TTS
Hello Team,
Is it possible to run TTS streaming with streaming input text with same file name?
Example:
def llm_write(prompt: str):
for chunk in openai.ChatCompletion.create(
model="gpt-3.5-turbo",
message=[{"role": "user", "content": prompt}],
stream=True
):
if (text_chunk := chunk["choice"][0]["delta"].get("content")) is not None:
yield text_chunk
text_stream = llm_write("Hello, what is LLM?")
audio = stream_ffplay(
tts(
args.text,
speaker,
args.language,
args.server_url,
args.stream_chunk_size
),
args.output_file,
save=bool(args.output_file)
)
With minimum words to the TTS api.
Thanks, Santhosh