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

Integrating Opentts into a android tts engine. #41

Open
LuekWasHere opened this issue Jul 12, 2023 · 0 comments
Open

Integrating Opentts into a android tts engine. #41

LuekWasHere opened this issue Jul 12, 2023 · 0 comments

Comments

@LuekWasHere
Copy link

Hello!
I thought i'd attempt to raise this issue here, as it seems fit. Be aware im quite new to working with or understanding source code.
I have been trying to integrate the opentts api into a open source android system-wide tts (tts-server-android). It was going well except there seems to be a conflict with the opentts api when trying to do a http request to it.

The application allows for custom http requests, in this format:

"The format is the same as the Legado APP network TTS engine:
http://url, {"method":"POST", "body": "POST body. support using {{js code or variable}} "}

Built-in variables:

  • Text:{{speakText}}
  • Speed:{{speakSpeed}}
  • Volume:{{speakVolume}}

Baidu Example:
http://tsn.baidu.com/text2audio,{"method": "POST", "body": "tex={{encodeURI(speakText)}}&spd={{speakSpeed}}&per=4114&cuid=baidu_speech_demo&idx=1&cod=2&lan=zh&ctp=1&pdt=220&vol={{speakVolume}}&aue=6&pit=5&res_tag=audio"} "

I tried to make a custom http request to the opentts server running in docker.
Using this url:
http://192.168.0.226:5500/api/tts?voice=larynx%3Acmu_aew-glow_tts&text={{java.encodeURI(speakText)}}&vocoder=low&denoiserStrength=0&cache=true

Some raw inputs work and others seem to conflict with the syntax.

This does not work:

from an intelligence explosion (Good 1965): a process in which software based intelligent minds enter a runaway reaction of self improvement cycles, with each new and more intelligent generation appearing faster than its predecessor

log output:

Failed: (1) cc.l: Expected start of the object '{', but had 'EOF' instead at path: $ JSON input: %20with%20each%20new%20and%20more%20intelligent%20generation%20appearing%20faster%20than%20its%20predecessor.&vocoder=low&denoiserStrength=0&cache=true

This does work:

Part I of this volume is dedicated to essays which argue that progress in artificial intelligence and machine learning may indeed increase machine intelligence beyond that of any human being.

I'm curious to see what you think (or if you notice a issue I cant seem to detect.), as I strongly believe if I can get this reliably integrated into this application, I will have a functioning and incredibly good quality tts, that might encourage further development. So far the text that does get parsed is incredble.

Additionally here is a link to a issue raised by myself to the developer of the android application aswell. It has more detail on the information specific to the application itself.

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

1 participant