rany2 / edge-tts

Use Microsoft Edge's online text-to-speech service from Python WITHOUT needing Microsoft Edge or Windows or an API key
https://pypi.org/project/edge-tts/
GNU General Public License v3.0
4.48k stars 462 forks source link

How to use this api in Node service #102

Closed bzzz1023 closed 1 year ago

bzzz1023 commented 1 year ago

I want to use it create a web server with node. appreciate your reply

bzzz1023 commented 1 year ago

i have made it in node with child_process module. by the way I also have a question,i see someone said he execute this command after about forty times and then start to fail, so is this the reason for that one ip use it too many times?

rany2 commented 1 year ago

@bzzz1023 He was executing that command 40 times in parallel. Realistically if you aren't using it in a very spammy way it shouldn't be an issue, regardless I haven't had an issue running it in parallel more than a hundred times, so I guess it depends on the server. Worst case, you could try to rerun the command with some exponential backoff if you really wanted to be extremely spammy and do things in parallel...

bzzz1023 commented 1 year ago

so appreciate you reply btw what is the spammy way to use it ,could you please make some examples?

rany2 commented 1 year ago

by spammy, I mean running more than 40 connections in parallel to the TTS server.. that sort of thing

bzzz1023 commented 1 year ago

i see , actually i did not learn python before so, with this library ,every time i execute the command and will it automatically end the connection with TTS ? if it is, i just need to record the max connection at same time

rany2 commented 1 year ago

@bzzz1023 yes it does

bzzz1023 commented 1 year ago

cool, thank you very much!