migushthe2nd / msedgetts Goto Github PK
View Code? Open in Web Editor NEWA simple Azure Speech Service module that uses the Microsoft Edge Read Aloud API
Home Page: https://migushthe2nd.github.io/MsEdgeTTS/
License: MIT License
A simple Azure Speech Service module that uses the Microsoft Edge Read Aloud API
Home Page: https://migushthe2nd.github.io/MsEdgeTTS/
License: MIT License
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
is there a possibility to get JSON format as output with start time end time and it's value (resp word)
Hi.
The info to use MsEdgeTTS.OUTPUT_FORMATS.
throw typeof error. After update OUTPUT_FORMATS
renamed OUTPUT_FORMAT
.
Offtopic:
Could add the limits to usage MsEdgeTTS? I mean: How many words support into a text?
Could make a Google neural TTS module? (without apiKey)
How to reuse a wss connection?
It takes a lot of time to connect to wss every time.
Is it possible to use the same wss for multiple tts requests?
I'm working on a program which requires the generation of many TTS audio streams. In this program, I iterate through each string using a for loop and have it read using this package with the toStream function with configured ProsodyOptions. This error randomly occurs during the iteration of generating TTS audio.
Here is the full error stack:
node:events:496
throw er; // Unhandled 'error' event
^
Error [ERR_STREAM_PUSH_AFTER_EOF]: stream.push() after EOF
at readableAddChunkPushByteMode (node:internal/streams/readable:493:28)
at Readable.push (node:internal/streams/readable:390:5)
at MsEdgeTTS.cacheAudioData (C:\Users\me\Documents\GitHub\project\node_modules\msedge-tts\dist\MsEdgeTTS.js:166:32)
at _ws.onmessage (C:\Users\me\Documents\GitHub\project\node_modules\msedge-tts\dist\MsEdgeTTS.js:142:30)
at callListener (C:\Users\me\Documents\GitHub\project\node_modules\ws\lib\event-target.js:290:14)
at WebSocket.onMessage (C:\Users\me\Documents\GitHub\project\node_modules\ws\lib\event-target.js:209:9)
at WebSocket.emit (node:events:518:28)
at Receiver.receiverOnMessage (C:\Users\me\Documents\GitHub\project\node_modules\ws\lib\websocket.js:1209:20)
at Receiver.emit (node:events:518:28)
at C:\Users\me\Documents\GitHub\project\node_modules\ws\lib\receiver.js:581:16
Emitted 'error' event on Readable instance at:
at emitErrorNT (node:internal/streams/destroy:169:8)
at emitErrorCloseNT (node:internal/streams/destroy:128:3)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
code: 'ERR_STREAM_PUSH_AFTER_EOF'
}
This error seems to be initiated by the following code:
this._queue[requestId].push(audioData);
This line is located in the cacheAudioData function. The error itself seems to have to do with pushing audioData after the stream has already ended.
If you come up with a fix, even if temporary, please let me know! If you need any additional information, please feel free to ask.
Whether the role and styledegree fields are supported?
const readable = tts.toStream(voiceOver, {
rate: ${formatN(opt.rate)}%
,
pitch: ${formatN(opt.pitch)}st
,
volume: ${formatN(opt.volume)}%
,
});
like this
const readable = tts.toStream(voiceOver, {
rate: ${formatN(opt.rate)}%
,
pitch: ${formatN(opt.pitch)}st
,
volume: ${formatN(opt.volume)}%
,
role,
styledegree
});
ii use it in TypeScript , but it tip:
TypeError: websocket_1.client is not a constructor
I would like to connect to the edge TTS service through a proxy. Would you consider adding the option of proxy?
Does this library support importing in the CommonJS method?
import {MsEdgeTTS, OUTPUT_FORMAT} from "msedge-tts";
(async () => {
const tts = new MsEdgeTTS();
await tts.setMetadata("en-US-AriaNeural", OUTPUT_FORMAT.RIFF_16KHZ_16BIT_MONO_PCM);
const filePath = await tts.toFile("./wav.wav", "Hi, how are you?");
})();
The format RIFF_16KHZ_16BIT_MONO_PCM does not produce WAV files
No audio return from the API when sending with those tags to fine-tune pitch, pronunciation, speaking rate, etc.
Text without any adjustment will still work fine.
Hi there,
I recently tried updating this package from version 1.1.4 to the latest version (1.2.1). However, upon making this update, I noticed that when I tried to generate audio, no audio was actually being generated. Are there any changes I am supposed to make to my code that occurred between version 1.1.4 and version 1.2.1? Or does the latest version of the package just not work correctly? I had trouble finding a changelog so I'm not sure what changes were made that may cause the problem I am experiencing. Any help is greatly appreciated.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.