MycroftAI / mimic3

A fast local neural text to speech engine for Mycroft
GNU Affero General Public License v3.0
1.08k stars 103 forks source link

Allow unescaped `#` in web API for choosing voice speaker #35

Open IFcoltransG opened 1 year ago

IFcoltransG commented 1 year ago

Using the web server POST API, I found voice key selection a little confusing. I could enter a speakerless key like en_US/vctk_low without escaping the /, which made me think the # in en_US/vctk_low#p238 wouldn't need to be URI encoded as %23 either. I expected the API to parse the fragment and convert it to a speaker. Not so, it simply ignores the fragment, which puzzled me for some time figuring out how to set a speaker.

I would like the API to parse any fragments and append them to the last query with a hash sign. This would make it consistent with not needing to escape the /.

The current workaround is simply to use %23 as an escaped replacement for a hash in POST requests. It makes sense for a web API to require this, but it made my user experience worse due to confusion with the /. Another aid could be to give an example in the documentation where the curl query has a speaker set, which would include the escaped #.