elevenlabs / elevenlabs-js

The official JavaScript (Node) library for ElevenLabs Text to Speech.
https://elevenlabs.io
MIT License
60 stars 7 forks source link

Do you use the correct method to make a stream output? #18

Closed allohamora closed 3 months ago

allohamora commented 3 months ago

https://github.com/elevenlabs/elevenlabs-js/blob/895b6199376cd4f8af87cba4498075754765e363/src/wrapper/ElevenLabsClient.ts#L70-L74

allohamora commented 3 months ago

It looks like there should be:

if (isGenerateAudioStream(request)) {
    return await this.textToSpeech.convertAsStream(voiceId, request, requestOptions);
} else {
    return await this.textToSpeech.convert(voiceId, request, requestOptions);
}
fern-bot commented 3 months ago

This is fixed in v0.2.2!