Instant Audio Streaming with ElevenLabs AI Voice API - Here's How

Поділитися
Вставка
  • Опубліковано 28 кві 2023
  • github.com/jsammarco/ElevenLa...
    Check out ConsultingJoe.com for more.
    ~-~~-~~~-~~-~
    Please watch: "4K RC Flight in Shorewood, IL with Bixler 1.1 Plane & GoPro Hero 10"
    • 4K RC Flight in Shorew...
    ~-~~-~~~-~~-~
  • Наука та технологія

КОМЕНТАРІ • 25

  • @gdyung2
    @gdyung2 6 місяців тому +1

    Great video! Thanks for sharing the tip.

  • @zhangxiang18
    @zhangxiang18 11 місяців тому +1

    Awesome vid and just wonder: is there any way to use voice_id from Multilingual v2? I can tell that if I use a voice ID I trained with Multilingual v2, the sounds strange... Thanks.

    • @ConsultingjoeOnline
      @ConsultingjoeOnline  11 місяців тому

      Not quite sure. Sry, haven't used the api lately myself.

  • @JuliensOasis
    @JuliensOasis 10 місяців тому +1

    Hi Joe, do you know how to get the Elevenlabs Voices into a Twitch stream for the Community? I See a lot of streamen doing it for his donations.

  • @mightyaripage
    @mightyaripage Рік тому +3

    great video, just letting you know your api key and voice id are pushed to github

  • @user-ou1by4kl2z
    @user-ou1by4kl2z 4 місяці тому +1

    Has anyone tackled streaming text in to then stream audio out; looking to see I can generate real-time audio as the generative text comes in. I appreciate some of the complexities with chunking and buffering, but every example I've seen to date sends into pre-defined text in to then stream out (which is great), but I really wan the audio to start as soon as I get text back from a LLM without waiting for the whole text to be completed.
    Curious if you or the community has thoughts.

    • @ConsultingjoeOnline
      @ConsultingjoeOnline  4 місяці тому

      I have played with Ollama and created my own ChatGPT-like web interface but to stream to elevenlabs you would need to chunk the streams up and then there would be gaps in the speech. You could just break it up by paragraphs. Thanks for watching ❤

    • @user-ou1by4kl2z
      @user-ou1by4kl2z 4 місяці тому

      Thanks, @ConsultingjoeOnline. That's where I'm leaning, but for the obvious concerns with buffering and chunking. At least I'm not entirely crazy to think this way nor identify some of the concerns/issues. Ideally someone will provide a chunk'd text+audio stream simultaneously only as this would provide the lowest possible latency (I believe).

  • @MerkieAE
    @MerkieAE 3 місяці тому +1

    I ran some tests of this code and it turns out it's just as fast as using the non-streaming API :( If you want to really improve speed use ?optimize_streaming_latency=1 at the end of the URL it shaves off about 2 seconds without any noticeable drop in quality. You can also take it up to =4 but I found that the difference is negligible for my use case. But the default is 0 so using even 1 will get you speed results.

  • @RTSSupercar
    @RTSSupercar 2 місяці тому +1

    Very good ! I tested the code and it works; the only strange thing is that the audio has an English accent, in whatever language the sentence is to be transformed from text to voice.
    As far as you know, do you need to enter any other parameters? Thanks for your answer ..

    • @ConsultingjoeOnline
      @ConsultingjoeOnline  2 місяці тому

      Thanks for watching. No that's weird. Try another voice with default parameters

  • @bloxmasterplayz7412
    @bloxmasterplayz7412 10 місяців тому +1

    This video is quite cool! Do you know why I am getting this error 401 code every time I try running it on my end?

  • @Toby-yz7wt
    @Toby-yz7wt Рік тому +2

    how does this work with Next.js?
    i can't get the client side working to stream the audio.

    • @thedoctor5478
      @thedoctor5478 11 місяців тому +1

      did you sort it out? I have my own code in Python streaming from elevenlabs which I then relayed to a websocket so browser can consume but the audio is super choppy for some reason

    • @aniket_bansal_
      @aniket_bansal_ 11 місяців тому

      @@thedoctor5478 hey did you figure how to do it? or please if possible could you share your code

    • @ConsultingjoeOnline
      @ConsultingjoeOnline  11 місяців тому

      Have you asked chat gpt about it?

  • @imhardikdesai
    @imhardikdesai 2 місяці тому +1

    Any example for Javascript? it would be great help

    • @ConsultingjoeOnline
      @ConsultingjoeOnline  2 місяці тому

      Like with NodeJS?

    • @imhardikdesai
      @imhardikdesai 2 місяці тому

      @@ConsultingjoeOnline actually node js is server side right? But I am talking about client side with venila javascript

  • @S_s_s_s_s_s_s_x_s_s_s_s_s_s_S
    @S_s_s_s_s_s_s_x_s_s_s_s_s_s_S Рік тому +2

    hello, i have a problem, i get error 400 what do i do about it?

    • @ConsultingjoeOnline
      @ConsultingjoeOnline  8 місяців тому +1

      Hope you figured it out. www.google.com/search?q=error+400+meaning
      Maybe bad API key or missing params