Giter Club home page Giter Club logo

msedgetts's People

Contributors

guquan-lengyue avatar migushthe2nd avatar yacine-bens avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

msedgetts's Issues

no browser support ?

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.

image

setMetadata want to create a websocket instance (initClient) and try to access a "client" method which does not exist :/
image

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

JSON as output

is there a possibility to get JSON format as output with start time end time and it's value (resp word)

Readme need to be fix

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)

reuse a wss connection

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?

Error [ERR_STREAM_PUSH_AFTER_EOF]: stream.push() after EOF

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.

Reserved Characters in SSML

If the text contains reserved characters (<>&"') it won't work. Using a simple escape function solves the issue:
image
image

Whether the role and styledegree fields are supported?

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
});

image

support proxy

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?

RIFF_16KHZ_16BIT_MONO_PCM cannot generate WAV format files

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

Not able fine-tune anymore

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.

Version 1.2.1 Does Not Generate Audio

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.