Skip to content
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

"TypeError: response.body?.getReader is not a function" from package/plugin-node #1265

Closed
y4my4my4m opened this issue Dec 20, 2024 · 1 comment · Fixed by #1312
Closed

"TypeError: response.body?.getReader is not a function" from package/plugin-node #1265

y4my4my4m opened this issue Dec 20, 2024 · 1 comment · Fixed by #1312
Labels
bug Something isn't working

Comments

@y4my4my4m
Copy link
Contributor

Describe the bug

When attempting to produce speech using elevenlabs, from my discord bot, there is an error regarding getReader is not a function.

https://github.com/ai16z/eliza/blob/81d027327ebba82ef3ed473d0e914c90e18e362d/packages/plugin-node/src/services/speech.ts#L126C1-L126C16

I attempted to replace the fetch call with the official elevenlabs js package but wasn't successful

To Reproduce

  1. create discord bot character
  2. add to voice chat
  3. talk to it
  4. text response is generated, elevenlabs processing fails, defaults to the viits audio

Expected behavior

  1. create discord bot character
  2. add to voice chat
  3. talk to it
  4. text response is generated, elevenlabs processing fails, properly outputs the elevenlabs audio

Screenshots

Additional context

node v23.3.0
linux 6.12 - manjaro
@y4my4my4m y4my4my4m added the bug Something isn't working label Dec 20, 2024
@y4my4my4m
Copy link
Contributor Author

By the way, replacing the current code for elevenlabs package gives this error:

Speech generation error: ElevenLabsError: this.readableStream.getReader is not a function                                                                                                                                                               
    at TextToSpeech.<anonymous> (eliza/node_modules/elevenlabs/api/resources/textToSpeech/client/Client.js:253:27)                                                                                                              
    at Generator.next (<anonymous>)                                                                                                                                                                                                                     
    at fulfilled (eliza/node_modules/elevenlabs/api/resources/textToSpeech/client/Client.js:31:58)                                                                                                                              
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant