Coding an AI Voice Bot from Scratch: Real-Time Conversation with Python

Поділитися
Вставка
  • Опубліковано 23 жов 2024

КОМЕНТАРІ • 73

  • @NatGreenOnline
    @NatGreenOnline 7 місяців тому +29

    Using Groq / Mistral AI instead of OpenAI will greatly reduce the latency issue you have in your demo.

    • @logannon
      @logannon 7 місяців тому

      can you fine tune groq?

    • @AssemblyAI
      @AssemblyAI  6 місяців тому

      Great suggestion, we will explore this in the next tutorial. This one was meant to be as accessible as possible so that people could build quickly.

    • @조바이든-r6r
      @조바이든-r6r 5 місяців тому

      @@logannon no its impossible to fine tune groq. thats the problem. you have to use rag instead of fine tuning. but if you wanna make chatbot for specific domain you should try other service

    • @TrilioniME
      @TrilioniME 3 місяці тому

      How much does Mistral API cost?

  • @fatmayonca1723
    @fatmayonca1723 4 місяці тому +37

    How is it from scratch? You are using 3 Api. Also assembly api doesn't transcribe live audio streams without setting up billing. You have to put minimum 10 dollars in it for that too. I don't have a problem with that. But I have a problem you not telling this in advance, at the start of the video. You actually never mention this in anywhere in the video. It doesn't respond after the introduction. That's how you find out the problem is billing. Not from the video. That was quite annoying to be honest. Potentially great video ruined by lack of transparency.

  • @randotkatsenko5157
    @randotkatsenko5157 5 місяців тому +1

    Hi nice tutorial. I have coded real-time voice bot for phone conversations in Twilio.
    The latency comes from text-to-speech mostly and gpt response time.
    I'm guesing if either ones speed can be reduced about 2-3x, then the response time would be fast enough. In human conversation, we expect the response within 1 second....and anything above that seems more unnatural. I'm sure the speed issues will be solved with new Nvidia GPU-s or other hardware innovations.

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

      Hi, can you please let me know how you developed the voice bot using Twilio’s, even I’m looking for such kind of bot. It would be helpful

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

      ​@@rammohanbethi Hi, how can you let you know - its a lot of complicated server side code in node js and some python...
      The setup is too complex to explain in a comment. We make this as part of AI automation services for businesses.

    • @Sibixpur
      @Sibixpur 3 місяці тому

      @@randotkatsenko5157 bro speaking as if he coded all the logic voice bot , bruhh you're just hitting API's that ain't complex....

  • @JeffreyJohnson-vy1zm
    @JeffreyJohnson-vy1zm 7 місяців тому +1

    Two questions: How can we improve the latency between the patient's response and the AI voice reply? and What can be done for the AI Voice to account for patient input if the patient speaks while the AI voice is speaking?

    • @AssemblyAI
      @AssemblyAI  6 місяців тому

      Hi Jeffrey, two very good questions! These deserve a video on their own, to be honest. To improve latency one thing you could try is running the LLM locally so you can get a faster inference over calling openai's API. As for handling overlapping speech, I've written the program to stop listening when the AI voice is responding back. But what you could do, is run another thread that is still listening while the AI voice is speaking.

    • @EvertvanBrussel
      @EvertvanBrussel 6 місяців тому

      As for the latency, I was assuming the majority of the latency was actually coming from ElevenLabs? And likely also from whatever functions might be needed to actually check the availability of the dentist and then also to schedule the actual appointment in the end. Am I wrong?
      So yeah I think running the LLM locally will surely help, or using Groq, but I'm not convinced yet that that is the biggest bottleneck.

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

    would you consider adding a web UI like gradio to this app so that we can send the demo to anyone if needed. this version only works if you run the actual code in your own environment.

  • @FaisalKhrisan
    @FaisalKhrisan 5 місяців тому +5

    But I still have problems it says that [from elevenlabs import generate, stream
    ImportError: cannot import name 'generate' from 'elevenlabs'] how come

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

      i have the exact same error did you fix it ?

  • @PalashDandge
    @PalashDandge 5 місяців тому +4

    i am getting error "Cannot find reference 'generate' in '__init__.py' " on from elevenlabs import generate, stream line can you please help me to resolve this issue

  • @simonsandeep4977
    @simonsandeep4977 6 місяців тому +3

    The programming is not responding after the first introduction ,as shown in the video ;though even after using the github code. Any alternative with step by step instruction video ?

  • @bens4446
    @bens4446 4 місяці тому +2

    Thanks. First time I hear of AssemblyAI. Everyone talks about faster_whisper and Deepgram. Is AssemblyAI better for STT?

  • @JokerJarvis-cy2sw
    @JokerJarvis-cy2sw 7 місяців тому +2

    Please a tutorial on llava vision model to analyze video live with cv2
    And I am unable to get my API token from assembly AI website please fix it

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

    I followed this tutorial then in the end I realized .. assemblyAI doesn't provide the support for the Japanese language in the live Reltimetranscriber. Which sucks .. lol can't use it. Any help? @assemblyAI

  • @shissncg
    @shissncg Місяць тому

    How do you grab the audio once the RealtimeTranscript has finalized? For example, could you pass the audio rather than the text to generate_ai_response?

  • @iainhmunro
    @iainhmunro 6 місяців тому +2

    Hi There - I was just looking at the code. Where is the appointment setting details / info coming from ?

    • @AssemblyAI
      @AssemblyAI  6 місяців тому

      All that is coming from the LLM we are using, so it's not hard-coded.

  • @TheBestgoku
    @TheBestgoku 6 місяців тому

    why not chunk text and output instead of output after all text is generated?

  • @nagarajdoddamani697
    @nagarajdoddamani697 19 днів тому

    in py laptop the brew not installing, and also in program is not working

  • @yitaowang8547
    @yitaowang8547 Місяць тому

    Thank you! Such a useful application and well explained ❤

  • @yuchengpeng7706
    @yuchengpeng7706 6 місяців тому

    This video is so great! I'm following your video but now I ran into this problem, I can install the package in Pycharm with Windows system, but I got this error: OSError: Cannot find mpv-1.dll, mpv-2.dll or libmpv-2.dll in your system %PATH%. I'm a researcher in the art field with only a debutant python knowledge, could you help me solve this problem? Thanks a lot!

  • @abdulazad8432
    @abdulazad8432 Місяць тому

    Can it be inducted into Aurdino board?

  • @sarap.sadegh4691
    @sarap.sadegh4691 6 місяців тому

    hi thanks for your video . i want Api real time conversation with python for Farsi language . the LLM support Farsi language?

  • @thebackpainmiracle
    @thebackpainmiracle 5 місяців тому

    Exactly what I was intending on making. Thanks!

    • @MuskaanKhan.31
      @MuskaanKhan.31 3 місяці тому

      Hey there are you learning to create generative ai models
      If yes please reply I have project for you
      By creating this project you can practice how to create ai model as well as you can include this in your resume for job search and this will also be help full for me

    • @avataraang3334
      @avataraang3334 3 місяці тому

      @@MuskaanKhan.31 I am interested in a project! Just need required data and the objective you have in mind

  • @Akash-nb9sv
    @Akash-nb9sv Місяць тому

    may how to install brew does not have for windows other option for windows

  • @theghostyced
    @theghostyced 5 місяців тому

    how would you handle interruptions while the ai is talking?

  • @vishalsaichindepalli2798
    @vishalsaichindepalli2798 7 місяців тому

    For some reason, the microphone isn't picking up my voice. I enabled all permissions on my mac and am still having trouble. Is there any way to fix this?

    • @michaelnumnum
      @michaelnumnum 7 місяців тому +1

      I think you need to pay for the real-time transcription for this at AssemblyAI

    • @Vrilogs
      @Vrilogs 5 місяців тому

      streaming from assembly ai is a paid service. So, first you need add balance into your account. If you have not done that yet. Hope that helps :)

  • @urekmazino1327
    @urekmazino1327 5 місяців тому

    any way to make one with adam voice like the one in elevenlabs?😊

  • @Alex-qo5je
    @Alex-qo5je 6 місяців тому +1

    How can i conect to my phone number and google calendar?🙏🏼

    • @AssemblyAI
      @AssemblyAI  6 місяців тому

      You can make use of the Google API for google calendar and something like Twilio's API for making phone calls.

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

    amazing lady and also an engineer omg)) thank you a million, I'll just add this to my stack

  • @daeralbra
    @daeralbra 7 місяців тому +2

    The only downside is the fact it takes a while to respond with voice.

  • @JR-joren
    @JR-joren 27 днів тому

    nice but the lagging time is too long unfortunately.

  • @nithishreddy7684
    @nithishreddy7684 6 місяців тому

    An error occured: Could not connect to the real-time service: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:997)
    what to do with this error?

    • @islamicinterestofficial
      @islamicinterestofficial 6 місяців тому

      same error. You found the solution?

    • @chittisai47
      @chittisai47 5 місяців тому

      most likely your microphone is switched off pls check

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

      i've got same:
      An error occured: Could not connect to the real-time service: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1006)

  • @CharlesZulu-v8g
    @CharlesZulu-v8g 10 днів тому

    your free api does not work in my project

  • @alifetechgenius3804
    @alifetechgenius3804 Місяць тому

    Source code Not Available

  • @mrunexpected10
    @mrunexpected10 7 місяців тому

    can u make just a chat bot word to voice

  • @pawanmaurya1554
    @pawanmaurya1554 4 дні тому

    ❤❤❤❤❤so wonderful project

  • @viditsharma6990
    @viditsharma6990 6 місяців тому

    i am facing the mpv value error on windows i already installed it many times how can i fix that

    • @sethuraman9884
      @sethuraman9884 6 місяців тому

      just use vlc instead mpv bro

    • @조바이든-r6r
      @조바이든-r6r 5 місяців тому

      @@sethuraman9884 thank you guys

    • @조바이든-r6r
      @조바이든-r6r 5 місяців тому

      or check environment path of mpv. when you command mpv --version on cmd. you have to see its running

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

    why are you using Mac omg

  • @jeevanjaison9646
    @jeevanjaison9646 5 місяців тому

    The assembly ai api is not free.

  • @mehdismaeili3743
    @mehdismaeili3743 5 місяців тому

    Excellent .

  • @MiguelCayazaya
    @MiguelCayazaya 5 місяців тому

    I am very api to have found this

  • @jhinaouiroudayna4275
    @jhinaouiroudayna4275 3 місяці тому

    assembly ai APIs requires a credit card for this task

  • @BeRMaNyA
    @BeRMaNyA 5 місяців тому +1

    TOO SLOW!

  • @nickvaleontis4657
    @nickvaleontis4657 Місяць тому

    From scratch is misleading as others already commented.

  • @Marvinzock34
    @Marvinzock34 Місяць тому

    No thats not scratch i have no money stop making me hope

  • @drmarioschannel
    @drmarioschannel 7 місяців тому +3

    after watching your video, i think i prefer interacting with humans

  • @urekmazino1327
    @urekmazino1327 5 місяців тому +1

    why are you saying fro. scratch if you're only using api

  • @BernardoCastro-eb6rp
    @BernardoCastro-eb6rp 5 місяців тому

    TOO SLOW !