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

Example #52

Closed
renanrox opened this issue Mar 23, 2023 · 3 comments
Closed

Example #52

renanrox opened this issue Mar 23, 2023 · 3 comments

Comments

@renanrox
Copy link

Hello!

i really need some examples of how to user aspeak 4.1 with python, i used to have 3.1 working, but i upgraded and got lost on the new 4 version,

can someone please make a examplo of how to make output a mp3 file based on an input.txt file

thanks in advance

@kxxt
Copy link
Owner

kxxt commented Mar 23, 2023

v4.0 is a breaking change. Please look at

@kxxt kxxt closed this as completed Mar 23, 2023
@kxxt
Copy link
Owner

kxxt commented Mar 23, 2023

For using aspeak v4 with python. See https://github.com/kxxt/aspeak#python

A minimal example:

text = "Hello World"
from aspeak import SpeechService, AudioFormat
srv = SpeechService(AudioFormat("mp3"))
srv.connect()
srv.synthesize_text(text, output="out.mp3")

Note that aspeak no longer automatically reconnects so you might need to reconnect manually.

@renanrox
Copy link
Author

For using aspeak v4 with python. See https://github.com/kxxt/aspeak#python

A minimal example:

text = "Hello World"
from aspeak import SpeechService, AudioFormat
srv = SpeechService(AudioFormat("mp3"))
srv.connect()
srv.synthesize_text(text, output="out.mp3")

Note that aspeak no longer automatically reconnects so you might need to reconnect manually.

dont get the reconnects manually.

now my script gives me an error about connect:

srv.connect()

OSError: Websocket error

not sure about whats happening,

thx in advance

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