-
Notifications
You must be signed in to change notification settings - Fork 20
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
[Feature] Add Voice API support #153
Conversation
Phew, I finally managed to merge it 🥵 Instead of saving it as a cookie, it will be saved in the database as a language entity. The automatic database update will come a bit later but you can change it manually running I also created a discussion on #174 so that users can share their tips. Inside LWT, the documentation is minimal for now, I may expend it later (I plan on scavenging data from #174). It's a nice feature, great job on this! |
Error documentation was also added.
New databse migration strategy. Fixes feeds (#168). Adds missing documentation to Docker (#146, #160). Changes in PHP and JS globals. Fixes reading position was not set. Read text through API (#153, #155). Fixes word was not saved/deleted. Fixes #170 and #69. Updates API (#175). Adds dependency to php-xml (#178, #181). Updates makefile (#179). Adds MeCab support on Mac (#135). Adds the option to hide/show word romanization (#119). Raises URL size limit to 2048 (#144).
As implied in #143, there are multiple TTS services that LWT can add functionality for especially the common ones; however, the varied authentication required for most can lead to bloat not to mention your desired TTS service not being present.
With this pull request, a generality of TTS-calls is used for customizability on the user-end whether Azure, Google Cloud, ... * as long as the response contains a data: URI.
A key note is that prior authorization is up to the user to configure. The user will have to provide it in the fetch JSON.
Input is the resource itself to fetch including any URL params. Options are the modifiers supplied to the call.
A placeholder of 'lwt_text' is required in the below object.
lwt_lang is an optional placeholder for the lang code.
Leave the textarea empty to disable otherwise default browser SpeechAPI won't run.
The format is below.
steps to test
In text-to-speech settings add the request in JSON format to the Voice API Request text area and save.
Then in read mode, click the audio buttons.
limitations
If there is an API word limit, the read browser button may not run at all as API returns empty.
To enable, it is required that LWT TTS cookies be allowed to be stored.
next steps
Currently 'lwt_text' and 'lwt_lang' placeholders are revealed for user customizability but pitch and rate could also be given.
example request
As using subscriber services from Amazon Polly or Google text-to-speech would require authentication, huggingface is used for the example. The following can be pasted for the Japanese language text-to-speech configuration.
user contribs
If you would like, reply to the thread with the parameters you used in a successful JSON request call for whichever particular resource such as Azure, Polly, or Google text-to-speech as some resources are authentication tedious.