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

Pyttsx3 can work on heroku? #228

Closed
sekpona1-crypto opened this issue Feb 25, 2022 · 2 comments
Closed

Pyttsx3 can work on heroku? #228

sekpona1-crypto opened this issue Feb 25, 2022 · 2 comments

Comments

@sekpona1-crypto
Copy link

Hello every one. My problem is to know if pyttsx3 can work as heroku app or can be deploy as cloud app? And if we can create tts api whith it. Because pyttsx3 use our local machine voice. Where can it found voices on cloud? Is another way to install these voices? Please help me. (Sorry for my english. I'm french")

@maskill
Copy link

maskill commented Jul 5, 2022

Hi, hopefully this maybe useful to you or anyone else. Assuming heroku can import the pyttsx3 module it may be possible to save the audio as an .mp3 file server-side. After that the file can be sent to the client and played using a default media player.

Documentation

import pyttsx3
engine = pyttsx3.init()
engine.save_to_file('Hello World' , 'test.mp3')
engine.runAndWait()

This thread may be helpful with finding and installing new voices.

@willwade
Copy link
Collaborator

Just an update to anyone. It should technically as long as espeak installed on the runner. Like @maskill says use save to file. I’d actually suggest though using a diff voice engine. Take a look at https://github.com/willwade/tts-wrapper and the bytestream methods. I guess if I finish #333 that would be useful in this scenario too.

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

3 participants