1neReality / MITSUHA

World's First Multilingual Inexpensive Therapeutic Sophisticated Ultra-responsive Holographic Agent. In simple terms, an AI you can talk to and it'll talk back with a body using VTube Studio.
https://www.youtube.com/@0neReality
GNU General Public License v3.0
212 stars 20 forks source link

Voicebox text to speech #4

Closed NOOB-3301 closed 1 year ago

NOOB-3301 commented 1 year ago

If you don't mind, can you provide the code for only text to speech,how do you send the request to the voicebox engine??

DogeLord081 commented 1 year ago

Sorry! I didn't see this issue somehow until now, this is the code for voicevox:

import requests

params_encoded = urllib.parse.urlencode({'text': "WHAT_YOU_WANT_TO_BE_SPOKEN_HERE", 'speaker': 20})
request = requests.post(f'http://127.0.0.1:50021/audio_query?{params_encoded}')
params_encoded = urllib.parse.urlencode({'speaker': 20, 'enable_interrogative_upspeak': True})
request = requests.post(f'http://127.0.0.1:50021/synthesis?{params_encoded}', json=request.json())

Also, before running the code you need to download and start the voicevox engine .exe file which should be run.exe in the voicevox folder as shown in 4 of README-OLD (Voicevox).MD

NOOB-3301 commented 1 year ago

Yeah I managed to figure it out..but forgot to close it Btw thanks 👍👍👍👍