netease-youdao / EmotiVoice

EmotiVoice 😊: a Multi-Voice and Prompt-Controlled TTS Engine
Apache License 2.0
6.9k stars 577 forks source link

TTS API Support? #13

Open xxy012 opened 8 months ago

xxy012 commented 8 months ago

It's a great project! Is there any plan to have a support API interface?

syq163 commented 8 months ago

Thank you for your suggestion. Could you please specify the type of API? Are you referring to a web API, a Python API, or something else?

yihong0618 commented 8 months ago

python api is enough like the demo, I think we can use it like a simple api

e = EmotiVoice()
e.generate_tts(“你好”, voice_id=200)
e.save("a.mp3")
syq163 commented 8 months ago

OK, got it!

trainliang commented 8 months ago

如何使用JSON api调用呢?

mp075496706 commented 8 months ago

python api is enough like the demo, I think we can use it like a simple api

e = EmotiVoice()
e.generate_tts(“你好”, voice_id=200)
e.save("a.mp3")

I think this API format is very convenient to use, but can the current version be used like this? I tried creating a new script to try this, but EmotiVoice() seems to have not been found.

syq163 commented 8 months ago

Apologies, EmotiVoice currently does not have a Python API, but we are considering its inclusion in a future version. Additionally, we are actively developing an HTTP API to facilitate easy access without the need for environment setup.