Replies: 1 comment
-
I figured it out, I was able to put a delay of 500 ms on the audio device which synchronized the audio and all is well! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I’m currently using Piper to generate speech from text in raw mode, which is streamed over multicast. The setup works well except for one issue: the first word consistently gets cut off when I start a multicast session or when there is a pause before a list is read.
As a workaround, I have tried first generating the audio, then using FFmpeg to add a small pause before multicasting, which fixes the issue. However, this isn't ideal for my application, as I’d prefer a more seamless solution.
Here is a brief overview of what I’m trying to achieve:
Use Piper to generate TTS in raw mode.
Stream the audio over multicast without cutting off the first word.
I believe adding a buffer at the start of the raw output stream before sending it over multicast might solve this, but I’m unsure how to implement this effectively. I’ve attached my Python code for reference below.
Any insights or suggestions on how I can address this issue would be greatly appreciated.
Thanks in advance for your help!
code:
import subprocess
import shlex
def stream_speech_to_multicast(text, multicast_address):
# Escape the text input to avoid issues with special characters
escaped_text = shlex.quote(text)
Beta Was this translation helpful? Give feedback.
All reactions