elevenlabs-python icon indicating copy to clipboard operation
elevenlabs-python copied to clipboard

Stream is not working in production

Open muhammad-grayphite opened this issue 1 year ago • 1 comments

I am using Streaming and I have deployed the app on huggingface, here is the code

audio = elevenlabs_client.generate(
        text=text,
        voice="Adam",
        model="eleven_turbo_v2_5",
        stream=True,
        optimize_streaming_latency=3
    )
 stream(audio)

but for some reason getting this error in stream function

Fontconfig error: No writable cache directories
Fontconfig error: No writable cache directories
Fontconfig error: No writable cache directories
Fontconfig error: No writable cache directories
Exception in thread Thread-7 (text_to_speech_file):
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
    self.run()
  File "/usr/local/lib/python3.10/threading.py", line 953, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/src/app/caller_v2.py", line 35, in text_to_speech_file
    stream(audio)
  File "/usr/local/lib/python3.10/site-packages/elevenlabs/play.py", line 91, in stream
    mpv_process.stdin.flush()  # type: ignore
BrokenPipeError: [Errno 32] Broken pipe

Things to considered I have installed all the spendencies and packages it required like mpv, ffmpeg Screenshot 2024-08-07 at 2 58 59 AM

muhammad-grayphite avatar Aug 06 '24 21:08 muhammad-grayphite

Hello, any update on this? Anyone??

muhammad-grayphite avatar Aug 12 '24 09:08 muhammad-grayphite

hi! please can you update this issue as i believe this is no longer an issue and there is not much information to go off. in the meantime i am closing the issue, but please reopen if you have more information

AngeloGiacco avatar Feb 03 '25 19:02 AngeloGiacco