Weilbyte / tiktok-tts

Generate TikTok Text-to-Speech voices in your browser
https://weilbyte.github.io/tiktok-tts/
MIT License
393 stars 85 forks source link

TTS API Requests #45

Open JoshoNZ opened 6 months ago

JoshoNZ commented 6 months ago

Hey Weilbyte,

I have a friend who has a speech impairment, who doesn't like using discords tts as its a mans voice, I was wonder if you would be willing support an api where I can request text in the URL for example

https://tiktok-tts.weilnet.workers.dev/api/generation/tts?text=Test&voice=female

Justiniscoding commented 3 months ago

@JoshoNZ You can use this node package. It is the same as this site, except isn't a website, and has functions that let you supply the string and generate the voice. You could also look into the code to see the actual endpoint of the tiktok API, but it's probably easier to just use the library

Weilbyte commented 3 months ago

@JoshoNZ You can use this node package. It is the same as this site, except isn't a website, and has functions that let you supply the string and generate the voice. You could also look into the code to see the actual endpoint of the tiktok API, but it's probably easier to just use the library

Library does seem easier to use. API access for this is available and it takes the same parameters (F12 network tab, to check example) but its as a JSON payload in body.

Weilbyte commented 3 months ago

Looking closer at it, it has some quirks:

Might send a few PRs to improve

JoshoNZ commented 3 months ago

Thanks Team, will look into it 👍