- Home /
Does anyone know how to use mary TTS in unity as a web API?
I'm working on text to speech on unity and I need to develop a voice bot with open source component in unity. I'm using Rasa for the chat and everything works good. Now I need an open source text to speech and pipeline the rasa response to that TTS component. That why I use mary. here is the web api I need to use to: http://mary.dfki.de/
Answer by SunnyChow · Sep 09, 2021 at 08:56 AM
i have no experience with it before.
but when i take a look, it seems their zip includes a marytts-server.bat which esaily launch the server in local with port 59125. and then i find out i can get the voice file by directly sending a GET request like
http://localhost:59125/process?INPUT_TYPE=TEXT&OUTPUT_TYPE=AUDIO&INPUT_TEXT=This%20is%20a%20test&OUTPUT_TEXT=&effect_Volume_selected=&effect_Volume_parameters=amount%3A2.0%3B&effect_Volume_default=Default&effect_Volume_help=Help&effect_TractScaler_selected=&effect_TractScaler_parameters=amount%3A1.5%3B&effect_TractScaler_default=Default&effect_TractScaler_help=Help&effect_F0Scale_selected=&effect_F0Scale_parameters=f0Scale%3A2.0%3B&effect_F0Scale_default=Default&effect_F0Scale_help=Help&effect_F0Add_selected=&effect_F0Add_parameters=f0Add%3A50.0%3B&effect_F0Add_default=Default&effect_F0Add_help=Help&effect_Rate_selected=&effect_Rate_parameters=durScale%3A1.5%3B&effect_Rate_default=Default&effect_Rate_help=Help&effect_Robot_selected=&effect_Robot_parameters=amount%3A100.0%3B&effect_Robot_default=Default&effect_Robot_help=Help&effect_Whisper_selected=&effect_Whisper_parameters=amount%3A100.0%3B&effect_Whisper_default=Default&effect_Whisper_help=Help&effect_Stadium_selected=&effect_Stadium_parameters=amount%3A100.0&effect_Stadium_default=Default&effect_Stadium_help=Help&effect_Chorus_selected=&effect_Chorus_parameters=delay1%3A466%3Bamp1%3A0.54%3Bdelay2%3A600%3Bamp2%3A-0.10%3Bdelay3%3A250%3Bamp3%3A0.30&effect_Chorus_default=Default&effect_Chorus_help=Help&effect_FIRFilter_selected=&effect_FIRFilter_parameters=type%3A3%3Bfc1%3A500.0%3Bfc2%3A2000.0&effect_FIRFilter_default=Default&effect_FIRFilter_help=Help&effect_JetPilot_selected=&effect_JetPilot_parameters=&effect_JetPilot_default=Default&effect_JetPilot_help=Help&HELP_TEXT=&exampleTexts=&VOICE_SELECTIONS=cmu-slt-hsmm%20en_US%20female%20hmm&AUDIO_OUT=WAVE_FILE&LOCALE=en_US&VOICE=cmu-slt-hsmm&AUDIO=WAVE_FILE
so, i guess you can do the same in unity? with the api WWW or UnityWebRequest?
if you want to integrate it inside Unity. i think you need use it develo a Java library, export to JAR, use ikvm to convert it to dll, and integrate that dll in Unity. Sounds like lots of work to me.
Your answer
![](https://koobas.hobune.stream/wayback/20220613042737im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
character speech 1 Answer
I can't use TTS on Android 11 1 Answer
How to create Text to Speech Application for android ? 0 Answers
text to speech in webplayer 0 Answers
Google text-to-speech via HTTP 7 Answers