Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ValueError: ('Sample format not supported', -9994) #221

Open
meufff opened this issue Nov 27, 2024 · 2 comments
Open

ValueError: ('Sample format not supported', -9994) #221

meufff opened this issue Nov 27, 2024 · 2 comments

Comments

@meufff
Copy link

meufff commented Nov 27, 2024

i really dont know how to fix it but it only occurs with OpenAIEngine,
with other engines it works fine

error:
"Exception in thread Thread-1 (_process_buffer):
Traceback (most recent call last):
File "C:\Users\Jstyw\AppData\Local\Programs\Python\Python311\Lib\threading.py", line 1038, in _bootstrap_inner
self.run()
File "C:\Users\Jstyw\AppData\Local\Programs\Python\Python311\Lib\threading.py", line 975, in run
self._target(*self._args, **self._kwargs)
File "C:\Users\Jstyw\AppData\Local\Programs\Python\Python311\Lib\site-packages\RealtimeTTS\stream_player.py", line 395, in _process_buffer
self._play_chunk(chunk)
File "C:\Users\Jstyw\AppData\Local\Programs\Python\Python311\Lib\site-packages\RealtimeTTS\stream_player.py", line 322, in play_chunk
sample_width = self.audio_stream.pyaudio_instance.get_sample_size(self.audio_stream.config.format)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Jstyw\AppData\Local\Programs\Python\Python311\Lib\site-packages\pyaudio_init
.py", line 616, in get_sample_size
return pa.get_sample_size(format)
^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: ('Sample format not supported', -9994)"

@KoljaB
Copy link
Owner

KoljaB commented Nov 27, 2024

Oh, thanks for reporting. Probably I messed something up or maybe OpenAI changed something, will look into that.

@meufff
Copy link
Author

meufff commented Nov 30, 2024

Now it works! Thank you so much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants