-
Notifications
You must be signed in to change notification settings - Fork 41
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
no browser support ? #4
Comments
The module was built for NodeJS. I'll have to check if a browser support is even possible (because of CORS), but don't expect that to happen anytime soon. |
@Migushthe2nd Thanks for the quick answer! I'm not sure either Then I found this https://github.com/Azure-Samples/cognitive-services-speech-sdk/tree/master/quickstart/javascript/browser/text-to-speech so I guess it's possible Did you shared your subscription token in the repo ? I've been using it for 2 days doing multiple tts/min lol |
The token in the repo is the one Microsoft Edge uses internally. I have never actually tried using it with the official TTS tools, so maybe the token is all you need for unlimited TTS requests. Could you perhaps try that?
…________________________________
From: Tucsky ***@***.***>
Sent: Saturday, July 23, 2022 1:14:49 AM
To: Migushthe2nd/MsEdgeTTS ***@***.***>
Cc: Migush ***@***.***>; Mention ***@***.***>
Subject: Re: [Migushthe2nd/MsEdgeTTS] no browser support ? (Issue #4)
@Migushthe2nd<https://github.com/Migushthe2nd> Thanks for the quick answer! I'm not sure either
I looked at your code, the voice endpoint work fine from the browser, the websocket I've not been able to open a connection yet
Then I found this https://github.com/Azure-Samples/cognitive-services-speech-sdk/tree/master/quickstart/javascript/browser/text-to-speech so I guess it's possible
Did you shared your subscription token in the repo ? I've been using it for 2 days doing multiple tts/min lol
Anyway I'm going to try this quickstart and get my own subscription token as well :)
—
Reply to this email directly, view it on GitHub<#4 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AFJ6FG6VUI7QRB4LXV34C5DVVMTOTANCNFSM54MVWVZQ>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
I would assume you can't simply use the token. You'll probably also have to use the specific endpoints Edge uses (and this module as well) |
Published a new version which uses the ws library thanks to @guquan-lengyue. Could you try the newest version? |
Thanks for the notice! I've published 1.3.3, which uses the |
The "process is not defined" error has to do with Webpack 5 which is unrelated to this library. And the other issue is that the WebSocket browser library is different from Nodejs, so I would have to edit the functions to be able to read ws data on the browser. I'll post the final result when I come up with a fully functional version :) |
After hours of testing, finally I have a functional version that works on both Nodejs and the Browser. Now the challenge is make the least possible changes to your code. First I'd like to address why
Since In case anyone is using this lib with Webpack 5, here are the minimum required changes to apply to |
@yacine-bens can you confirm the latest version works in the browser expected? |
Sorry for the late response. Yes, it's working perfectly. I made a simple Chrome extension using it. |
First of all thank you for this great tts lib it's one the best (free) I've seen so far 👍🏼
I'm trying to use it from the browser but it does not work.
setMetadata want to create a websocket instance (initClient) and try to access a "client" method which does not exist :/
I have no issue from nodejs. I didn't saw this was a nodejs only package in the doc, just want to make sure it is before moving on
The text was updated successfully, but these errors were encountered: