In fact, it is very similar to the version of iReader, so I don't want to write another API and just use the one I previously created for iReader.
Deploying the Forwarder#
There are two options: using Vercel or setting it up with Docker.
Comparison | Vercel | Docker Self-hosted |
---|---|---|
Pros | Easy to operate | No traffic limit |
Cons | Monthly free quota of 100GB traffic | Requires VPS/NAS, and some knowledge of Docker |
For specific setup steps, please refer to the following two articles. The steps before operating in the iReader app are the same as in Source Reader.
Vercel version: iReader Audiobook Microsoft AI Voice TTS Vercel Deployment Tutorial
Docker version: iReader Audiobook Configuration Microsoft TTS Docker Self-hosted Version
Note: If you have installed it according to my tutorial before, you need to update it, otherwise the speed adjustment function will not work.
I have also added the update method in those two tutorials.
Before proceeding to the next step, please make sure you meet the following conditions:
- Have a website address, whether it is like
tts.yfi.moe
,ms-ra-forwarder-for-ifreetime.vercel.app
, orhttp://123.123.123.123:3000
, when opened, it should look like this:
- Know whether you have set a TOKEN and what the value is.
Source Reader Configuration#
-
Open Source Reader, go to My -> Voice Management -> Upper right corner -> Create Voice, give it a name, and paste the following content:
https://your.domain.here/api/aiyue?text={{speakText}}&voiceName=zh-CN-XiaoxiaoNeural&speed={{speakSpeed*4}},{ "method": "GET", "headers": {"authorization": "Bearer TOKEN"} }
-
Change
yourdomain.here
to the website address from the first step (if it is in the form of IP+port, also change https to http). -
zh-CN-XiaoxiaoNeural
can be changed to other voices, you can select one from the set up webpage (not all voices may be available, so you need to test them first), the name corresponds to the English in parentheses in the "Configuration Name". -
If you have set a TOKEN, replace the word TOKEN in the configuration with your token, otherwise ignore it.
-
Save and test.