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

(problem and solution) save the audio in data buffer #61

Open
emmendoza2794 opened this issue Feb 17, 2024 · 0 comments
Open

(problem and solution) save the audio in data buffer #61

emmendoza2794 opened this issue Feb 17, 2024 · 0 comments

Comments

@emmendoza2794
Copy link

emmendoza2794 commented Feb 17, 2024

@alekssamos Thank you very much for this tool, I barely know it and it is perfect for some projects I am working on.

Problem:
When trying to save the audio file in a data buffer, the following error is displayed

msspeech/__init__.py, line 520, in _synthesize

     bc += await f.write(resp[1])

TypeError: object int can't be used in 'await' expression

My code

file = BytesIO()
await mss.synthesize(data.text.strip(), file)
file.seek(0)

Solution:
remove the await and it worked for me.

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

1 participant