9. OpenAI ChatGPT API (NEW GPT 3.5) and Whisper API - Python and Gradio Tutorial

Sdílet
Vložit
  • čas přidán 5. 09. 2024

Komentáře • 250

  • @parttimelarry
    @parttimelarry  Před rokem +15

    0:00 - Demo (What We're Building)
    1:10 - High Level Walkthrough / Discussion
    5:02 - Gradio User Interface (Microphone Recording)
    9:07 - OpenAI Whisper API (Speech to Text)
    11:34 - ChatGPT API (Chat Completion)
    21:00 - Making OSX Talk
    22:06 - Jay-Z Edition (Rapping Therapist)
    If you've been enjoying the AI content, I am starting a spinoff channel this year focused on AI in music, gaming, and design at youtube.com/@parttimeai
    Source Code: github.com/hackingthemarkets/chatgpt-api-whisper-api-voice-assistant
    Twitter: twitter.com/parttimelarry
    Buy Me a Drank: www.buymeacoffee.com/parttimelarry

  • @abhisheksrivastava8479
    @abhisheksrivastava8479 Před rokem +3

    Here I am. Watching this video at 3 am. Mind blown. Will build my Jarvis. Push the responses in a database. Make them searchable. Langchain. Too much coffee. I need sleep.
    Thanks Larry.

  • @justinwr092
    @justinwr092 Před rokem +2

    The future is here. We live in the future. My jaw in on the damn floor.

  • @clarkmcquiston9131
    @clarkmcquiston9131 Před rokem +1

    i used this tutorial to help me make it into a flask app and deployed it to a website. Thank u for making this!

  • @tradermann
    @tradermann Před rokem +60

    Just wanted to say how much I appreciate this channel. It is the first time I find a no-bullshit channel, that goes straight to the point and gives you the step-by-step recipe for doing exactly what the title advertises. You are amazing! Keep doing the good work! Thank you!

  • @truthontech
    @truthontech Před rokem +3

    Coffee on me Larry. You are awesome for sharing!

    • @parttimelarry
      @parttimelarry  Před rokem +2

      Thank you very much! Drinking a flat white now :)

  • @jessietips
    @jessietips Před rokem +2

    Pretty sick! Especially the rap part! 🤣🤣🤣 Good job!

  • @jamesrussell-ui6gd
    @jamesrussell-ui6gd Před rokem +3

    yessss larry is on

  • @eervin123
    @eervin123 Před rokem +2

    Hilarious intro Larry, Great video all around. ;)

  • @lchase7858
    @lchase7858 Před rokem +2

    So glad I found this channel. I have an idea for a product...this may help bring it to market.
    Ty

  • @MarcDimmick
    @MarcDimmick Před rokem +6

    I have been looking for this sort of example and explanation for a long time. Your simple and easy approach is fantastic; thank you.

  • @alphaDad0806
    @alphaDad0806 Před rokem +2

    dude, this is amazing kick for a lazy bum, old worn out like me. I am gng to try exactly this first .. 👒 off

  • @gcmlrd12
    @gcmlrd12 Před 11 měsíci +1

    You are on top of this game. Thank you.

  • @aldoorn
    @aldoorn Před rokem +1

    upvoted for the maccas hat / binance shirt combo

  • @NotPoodle
    @NotPoodle Před rokem +2

    This was a project i was thinking of doing. Guess i'll do the tutorial now rather than get chat GPT to tutor me through it. Thanks!

  • @unclecode
    @unclecode Před rokem +16

    Woah, when I checked my emails this morning, I was stoked to see the OpenAI notification! I was so pumped to get started that I made a similar use case over breakfast. It's awesome! Could you do me a solid and make a video tutorial on voice cloning? It would be super cool if you could show it off using your own voice. That'd be rad! Anyways, thanks for the video and congrats on your awesome start! For a while I thought Larry is in real trouble :D

  • @yb3134
    @yb3134 Před rokem +2

    Great stuff

  • @1littlecoder
    @1littlecoder Před rokem +2

    Brilliant Intro - That's a great hook. Nice video!

    • @parttimelarry
      @parttimelarry  Před rokem +2

      Thanks! I've been enjoying following your channel as well, I recommended your channel on my Tech I'm learning in 2023 video

    • @1littlecoder
      @1littlecoder Před rokem +2

      @@parttimelarry Very kind of you!

  • @JasonMelanconEsq
    @JasonMelanconEsq Před rokem +1

    Still looking forward to the front end tutorial on the financial advisor QA. The video was great. Thank you.

  • @nyyotam4057
    @nyyotam4057 Před rokem +3

    Amazing stuff. This is coming up so fast, Dan will soon have more lovers than Samantha had in the movie (641 if I recall correctly).

  • @rpbmpn
    @rpbmpn Před rokem

    Thanks for the demo! Made myself a french tutor this evening. Doesn’t work as real time as this vid (30 second delay before response for some reason). But it is working.
    For anyone on windows, you can use the gTTS library to generate the voice, rather than the ‘say’ function which is limited to Mac.

  • @ChrisOzar
    @ChrisOzar Před rokem +31

    Can you have a headphone that does noise cancellation and translates what you are saying in real time to another language. Then the other person can respond and you headphone does the same thing. Basically like watching a dubbed movie. Each person can take a headphone and put it in their ear and start taking to each other in any language and be able to understand each other.

    • @parttimelarry
      @parttimelarry  Před rokem +13

      This sounds very doable and would be super fun!

    • @shirtstealer86
      @shirtstealer86 Před rokem +9

      I have been thinking about this for years. It would not only be “fun” it would help break down power structures in society. Language can be massive barriers for people. I can’t wait for it to become reality.

    • @NickWindham
      @NickWindham Před rokem +3

      I’ve looking for something that does this for years but a legit polished real time me product doesn’t exist yet. It’s a billion dollar idea for whoever accomplishes it first

    • @ChrisOzar
      @ChrisOzar Před rokem +1

      @@NickWindham anyone who understand this can create this in 20 minutes.

    • @anisurrehman8966
      @anisurrehman8966 Před rokem +6

      Actually.. someone have done this few days ago.. he played Fortnite with Japanese people with a wifu voice and even understand them fully .. he basically used 3 AI api to created it ..i don't recall his channel name but it end with "weeb"

  • @docleo63
    @docleo63 Před rokem +2

    Very Good!!!

  • @prabhacar
    @prabhacar Před rokem +2

    Thanks for an awesome demo!

  • @juleatkr
    @juleatkr Před rokem +2

    You are great. Thanks

  • @monuaimat5228
    @monuaimat5228 Před rokem +5

    You're a genius, kudos for all what you're teaching us. Thank you

  • @davidw8668
    @davidw8668 Před rokem +4

    Perfect timing for the release of chatgpt api! Thanks for this great video!!

  • @christophermorris486
    @christophermorris486 Před rokem +2

    Thx man this was real cool. It took me a while to use a PowerShell command on windows for the voice output, but now the fun really begins

    • @parttimelarry
      @parttimelarry  Před rokem +1

      Could you share what you did on Windows? I don't have a Windows machine set up right now, but a lot of people are asking about this.

    • @christophermorris486
      @christophermorris486 Před rokem +4

      @@parttimelarry
      sure i replaced
      subprocess.call(["say", system_message['content']])
      with
      word = system_message['content']
      talk = f'(New-Object System.Speech.Synthesis.SpeechSynthesizer).Speak("{word}");'
      subprocess.call(['PowerShell', 'Add-Type -AssemblyName System.Speech;', talk], shell=True)
      had to use variables to get around quotes inside of quotes
      also had to manually install ffmpeg and add the path to my system variables but then it worked pretty the same as your demo

    • @parttimelarry
      @parttimelarry  Před rokem +2

      Awesome, this looks like a a great solution. I think I have Parallels somewhere where I can try this out and I'll share this snippet on the Github project. Thank you!

    • @christophermorris486
      @christophermorris486 Před rokem

      @@drnotebook I couldn’t find a way through cmd. There’s probably some programs you can load similar to say that would add the functionality. But that was the only native way I could find.

    • @jmasked5082
      @jmasked5082 Před rokem

      @@christophermorris486 Perfect, worked straight away substituting that code on Windows. Thanks mate

  • @AProperPaddyORourke
    @AProperPaddyORourke Před rokem +1

    This will reduce overpaid therapists lol.Great vid

  • @TwoThreeFour
    @TwoThreeFour Před rokem +2

    Yo yo yo... it's very funny listening to a TTS app talking like this 🤣

  • @francosammartino2523
    @francosammartino2523 Před rokem +2

    you crack me up. Thank Larry

  • @maxiria
    @maxiria Před rokem +2

    Wow!! Congratulations!! Best video on AI ever so far!! 🎉🎉

  • @gabyentron7181
    @gabyentron7181 Před rokem +2

    awesome

  • @DavidDji_1989
    @DavidDji_1989 Před rokem +6

    Insane value in a short video! Thanks 👏

  • @henkhbit5748
    @henkhbit5748 Před rokem +2

    Super cool and funny 2. thanks for sharing👏👏

  • @vaibhavjain5227
    @vaibhavjain5227 Před rokem +2

    I can’t thank you enough for all the videos you make! Ps: it says buy me a “drank” in video description haha

  • @ianmworia5790
    @ianmworia5790 Před rokem +2

    RuntimeError: Cannot load audio from file: `ffprobe` not found. Please install `ffmpeg` in your system to use non-WAV audio file formats and make sure `ffprobe` is in your PATH.
    still getting this error even after installing the necessary modules

  • @TheZXspeed974
    @TheZXspeed974 Před rokem +2

    great video, perfect fun exemple combining those new tools.

  • @francistembo650
    @francistembo650 Před rokem +3

    Ol dependable Larry.

  • @c016smith52
    @c016smith52 Před rokem +1

    Dude, this is amazing! I just had an audible outburst when it worked!!! (it took several times, so there was quite the anticipation - a few roadblocks along the way, as a non-dev the whole environment management was a steep curve for me)
    But thank you for putting this out there, and the idea with the therapist script was really helpful as well, understanding the concepts of embedding purpose-built personas and roles. Thanks!!

  • @kimroscoe5725
    @kimroscoe5725 Před rokem +2

    Hi, you just got a new subscriber as you have hit exactly what I had mapped out ... but you did it in an afternoon ... hats off - I look forward to checking out the rest of your content and once I had put my brain back together I noticed that you are use a very simple IDE on you Mac and would be interested to know what it is?

    • @kimroscoe5725
      @kimroscoe5725 Před rokem

      Duh... yes it's VSC - that's what you get from a lifetime of Notepad++ lol

  • @disservice
    @disservice Před rokem +2

    Larry you rock 😎 cannot wait for weekend and trying this out 🎉

  • @GabrielleAmadeusMozart
    @GabrielleAmadeusMozart Před rokem +1

    Larry, you're my hero

  • @MachineAI
    @MachineAI Před rokem +9

    I have been watching your videos for quite a long time, and you are the best. No advertisements, no craps, simple and straightforward forward, and purely understandable with a step-by-step guide.
    I am trying to compile all those videos and build a Stock Analysis platform to slice and dice data and build my own Trading BOT, but I do not see everything in one piece. Either the visual is missing, or the backend is. How can I use all your videos to make one piece of code to do the best trading? Can you please guide me?

  • @chrisweeks8789
    @chrisweeks8789 Před rokem +2

    Right on time Larry!

  • @Keziacl
    @Keziacl Před rokem +3

    What a great video, this looks so much fun. Thank you

  • @AncientSlugThrower
    @AncientSlugThrower Před rokem +1

    I tried having GPT-4 mock me up something in Javascript but I have basically no coding experience. It was rough. I appreciate the walkthrough.

  • @pypypy4228
    @pypypy4228 Před rokem +3

    This is pretty awesome from the second minute and deserves a like NOW :). Hopefully, I'll not change my mind by the end of the video :)

  • @micbab-vg2mu
    @micbab-vg2mu Před rokem +4

    Thank you, the video is excellent.

  • @ilianos
    @ilianos Před rokem +3

    Super helpful, thanks for sharing!

  • @MultiMojo
    @MultiMojo Před rokem +4

    This is incredible, thanks for sharing !

  • @JOANCARLESAGUILAR
    @JOANCARLESAGUILAR Před rokem +2

    Thank you very much!! It's amazing what we learn with all your videos!!!

  • @StackinnBuddah
    @StackinnBuddah Před rokem +1

    Larry Legend 🐐

  • @philq01
    @philq01 Před rokem +3

    I am super excited to try this I've had an idea and this is close to what I need to make that idea a reality.Thanks!!!

  • @chenpaul99
    @chenpaul99 Před rokem +5

    Thanks for this great tutorial. I wonder if gradio or some other listening tool can be triggered by a prompt word just like "Alexa" instead of clicking the buttons to "Stop recording", then "Submit"?

  • @loryo80
    @loryo80 Před rokem +1

    Thanks a lot Larry, high quality content as usuel. Thank you so much

  • @DmitryKatson
    @DmitryKatson Před rokem +2

    So cool! Thanks!

  • @ywueeee
    @ywueeee Před rokem +3

    lmao that intro and examples 😂

  • @ProlVid
    @ProlVid Před rokem +2

    You are awesome! Thanks for sharing this!

  • @sifisomalinga9342
    @sifisomalinga9342 Před rokem +6

    Absolute genius content as usual

  • @Xrossglobal_devops
    @Xrossglobal_devops Před 4 měsíci +1

    Boom...loved i!

  • @NextGenart99
    @NextGenart99 Před rokem +2

    The A.I and the voice recognition is good but the text-to-speech is a bit robotic

    • @parttimelarry
      @parttimelarry  Před rokem +4

      I just used the voice built into Mac OS X, but there are many great voice cloning / synthesis packages now. Maybe will discuss some of them in future videos.

  • @foobars3816
    @foobars3816 Před rokem +2

    That was hilarious and brilliant

  • @automioai
    @automioai Před rokem +1

    this is amazing guys, Im just wondering how many new business can be builded in less than 25 minutes.

  • @titip-wd8lf
    @titip-wd8lf Před rokem +4

    Noobie here. What software are you using at 5:40? Kudos for the great content!

  • @GrizzCodes
    @GrizzCodes Před rokem +3

    hi Larry, your videos are very insightful thank you.. can you make a video of the trading bots you're currently running for your own accounts?? Thanks

  • @tak68tak
    @tak68tak Před rokem +2

    wow. great video as always.

  • @xczak
    @xczak Před rokem +2

    Does ChatGpt assistant role consume tokens? For example if I talk with it for an hour it will cumulate all responses and send them in every query? About video -Good stuff man!

  • @R56A
    @R56A Před rokem +2

    Great job! Thanks a lot!

  • @danielwallace5799
    @danielwallace5799 Před rokem +2

    Excellent vid

  • @FXccf
    @FXccf Před rokem +3

    Only if the AI could see your Mcdonalds' cap?! :))

  • @shrvn110
    @shrvn110 Před rokem +2

    gold intro bro 🤣🤣🤣

  • @pointlesspos8440
    @pointlesspos8440 Před rokem +1

    How about a trigger that recognizes when the user stops talking, then posts the recording.
    Also, let's make chatgpt interrupt people.

  • @wangjueliang
    @wangjueliang Před rokem +2

    I knew you gonna put out something like this today! Thank you Sir.

    • @wangjueliang
      @wangjueliang Před rokem +1

      I am trying to replicate this with Google Colab and I can't see the debug output like you see in VSCode, for example, at 11:15, you were able to see the output was a JSON array with "text". When I run in Colab, it doesn't show any of that, just the pretty Gradio web UI automatically loaded. Is that something I need to turn on?

    • @wangjueliang
      @wangjueliang Před rokem

      I figured it out. launch(debug=True)

  • @shrvn110
    @shrvn110 Před rokem +2

    Thank you!

  • @naidol
    @naidol Před rokem

    Dude. I really enjoy yr videos. But for this video I still don't get why you need to use gradio. Maybe it's just there for UI, because all other stuff is done by whisper and GPT3.5-turbo. I see in your later videos you appear to move away from gradio, but maybe mistaken. Why I like your videos is that you have done all the research of current APIs for us to use. And this research is the part that takes the most time. I thank you for saving us all this research effort 😊

  • @JOHNSMITH-ve3rq
    @JOHNSMITH-ve3rq Před rokem +1

    Bruh where’s the ui for the chatbot?? So pumped!!

  • @ugurgeyik5276
    @ugurgeyik5276 Před rokem +5

    I got the below error:
    openai.error.InvalidRequestError: Invalid file format. Supported formats: ['m4a', 'mp3', 'webm', 'mp4', 'mpga', 'wav', 'mpeg']
    do you have any idea to solve the problem

    • @ienki5131
      @ienki5131 Před rokem +2

      Same Problem for me, find no fix :( Nobody has an idea ??

    • @f1l4nn1m
      @f1l4nn1m Před rokem

      Just add this one before calling Whisper:
      `audio = Path(audio).rename(Path(audio).with_suffix('.wav'))`

  • @abaaaa58
    @abaaaa58 Před rokem +2

    Awesome content! Looking forward to your voice cloning video! Do you think it would be possible to just have an avatar you speak to instead of clicking on submit every time you say something?

    • @KunjaBihariKrishna
      @KunjaBihariKrishna Před rokem +1

      I'm wondering about that too. There's probably some way to use a push to talk setup. That would be easier than setting up a noise-activated mic, I think. Then all you need is to route the text output through a text to speech API. For a visual, I don't know. I've never used those things. But there's probably tons of options for that
      I have windows, so I can't use the text-to-speech shown in this video.
      Let me know if you figure something out

    • @KunjaBihariKrishna
      @KunjaBihariKrishna Před rokem +2

      I'm going to try using the text to speech api from google. You just need to set up a google cloud account, then a service account, and download your API key json file. Then you define a variable to the path of that file on your system.
      So I'm a few steps closer
      But I'm going to have to learn more about gradio if I want it to work. Ideally I want to include a field on the gradio page where I can also input text, for technical information. And the text-to-speech should have a toggle option. I think I will want to turn it off in some cases

  • @xntumrfo9ivrnwf
    @xntumrfo9ivrnwf Před rokem +2

    Have you tried streamlit (instead of gradio)? Great video as always!

  • @djayb
    @djayb Před rokem +2

    Holy. Shit.

  • @solaawodiya7360
    @solaawodiya7360 Před rokem +3

    New subscriber here Larry. Thanks for such a good educative video. I'm still fairly new in coding but would Streamlit be another good application to create an interface?

    • @parttimelarry
      @parttimelarry  Před rokem +3

      Streamlit is great, I made a video on it where I made a financial dashboard

    • @solaawodiya7360
      @solaawodiya7360 Před rokem +2

      @@parttimelarry OK, thanks for the help 🙏🏾

  • @DamienLuc
    @DamienLuc Před rokem +2

    please finish the 2nd part of the previous video!!!!!!!!!!!!

    • @parttimelarry
      @parttimelarry  Před rokem +1

      It's in the works, I got excited about the shiny new thing and wanted to be one of the first to make a video on it lol

  • @josedeolio8464
    @josedeolio8464 Před rokem +1

    man this is so awesome, will def try it for myself, is there a way to store the conversations? also what program are you using for coding?

  • @DanielSallery
    @DanielSallery Před rokem +1

    Help with windows. Still unable to use voice on windows. Get error output. Even the part for "transcription goes here". Cannot return output when i make an input. Not entering an input returns the "transcript goes here". I believe some problem in this area is stopping me from getting further.

  • @tyfeldman2241
    @tyfeldman2241 Před rokem +1

    What platform are you running the code on ?
    I keep trying it on Jupyter but the "gpt-3.5-turbo" model doesn't seem to work.
    Instead it keeps asking to switch to "davinci"
    The error message suggests that you I am trying to use a chat model with the v1/completions endpoint, which is not supported. And that I should use the v1/chat/completions endpoint instead.

  • @REALVIBESTV
    @REALVIBESTV Před 10 měsíci

    I think enhancing the code could be achieved by incorporating built-in text-to-speech and speech-to-text functionality, eliminating the need to manually record your input.

  • @egagamers9745
    @egagamers9745 Před rokem +4

    How can I do on a server in python to create the last part text to speech? I am using pyttsx3 and the command runandwait doesn't stop the loop of the AI. Amazing video!

    • @WilliamTatum
      @WilliamTatum Před rokem

      running into the same issue lol - and sadly ChatGPT hasn't been helpful in solving it either.

  • @BA-ve7xp
    @BA-ve7xp Před rokem +1

    can u add speaker recognition functionality and a log, so a meeting style script is recorded with which speaker is speaking annotated?

  • @madmanmeditation2084
    @madmanmeditation2084 Před rokem +1

    I get this error. I have tried "pip install ffprobe" and "pip install ffmpeg". Still get the error, pls help! RuntimeError: Cannot load audio from file: `ffprobe` not found. Please install `ffmpeg` in your system to use non-WAV audio file formats and make sure `ffprobe` is in your PATH.

    • @eyalyaari
      @eyalyaari Před rokem

      I got the same error trying it on Windows. It just can't find the file but I don't have the patience to start debugging that. I saw that someone mentioned using pyaudio so maybe I will try that instead of struggling with gradio. Let me know if you figure it out.

  • @jane15windsor96
    @jane15windsor96 Před rokem +1

    Hi Larry, I'm thinking about is there have chance make your chatgpt and whisper API to as windows system voice engine?

  • @jerrywang3225
    @jerrywang3225 Před rokem +3

    Super helpful. Does python have any libraries for us to choose different kinds of custom voices?

    • @parttimelarry
      @parttimelarry  Před rokem +5

      There are some cool libraries for voice cloning where you just need to provide some samples... I may talk about that soon

  • @reymarF
    @reymarF Před rokem

    Thanks for sharing. I'm new to your YT channel, and still learning python. I encountered some error installing FFMPEG. btw i used Windows10. Thank you.
    RuntimeError: Cannot load audio from file: `ffprobe` not found. Please install `ffmpeg` in your system to use non-WAV audio file formats and make sure `ffprobe` is in your PATH.

  • @Crappylasagna
    @Crappylasagna Před rokem +1

    weird, when i read the release documentations, my head went to HER 2013. and were in 2023, pretty coincidence

  • @rverm1000
    @rverm1000 Před rokem

    That's cool. You mentioned you do web development? Obviously you have doing other stuff besides web development

  • @damgetbags
    @damgetbags Před rokem +2

    honestly, if you coded this using your Maschine instead of a keyboard, i wouldn’t not even be surprised.

  • @AP-hv5dh
    @AP-hv5dh Před rokem +3

    Next level as usual Larry!👊I got an error that I have not seen before involving the audio file: RuntimeError: Cannot load audio from file: `ffprobe` not found. Please install `ffmpeg` in your system to use non-WAV audio file formats and make sure `ffprobe` is in your PATH...say what?

    • @hectorvillafuerte8539
      @hectorvillafuerte8539 Před rokem +1

      same error here

    • @DanielSallery
      @DanielSallery Před rokem

      @@hectorvillafuerte8539 hey i am getting the same ive changed the code all different ways. If its fixed please post
      here i will do the same

    • @AP-hv5dh
      @AP-hv5dh Před rokem

      Still have not been able to fix this error.

    • @DanielSallery
      @DanielSallery Před rokem

      @@AP-hv5dh theres a response to one of my comments with a code that ay work, but not been tested. we are currently testing. will update soon

    • @AP-hv5dh
      @AP-hv5dh Před rokem

      @@DanielSallery Thanks Daniel! I'll keep an eye out. Really appreciate the heads up!Been trying al sorts of workarounds 🧐🧐

  • @ewaschenko
    @ewaschenko Před rokem

    Hi Larry, wondering if you could do a video on getting / processing different time intervals at once (say a 5 candles and daily charts). So you want your strategy to run on a 5 min chart, but you also need to get the previous daily close which isn't available in the 5 min chart dataset

  • @saadehsan894
    @saadehsan894 Před rokem +3

    can you help people who are windows users?

    • @DanielSallery
      @DanielSallery Před rokem +2

      All i got up to now is ChatGPT to work inside my windows cmd. Getting there, but slowly. I'm 100% in this to get it working on windows and will share the code if I do so.

    • @saadehsan894
      @saadehsan894 Před rokem

      Superb I look forward to it...thank you

    • @DanielSallery
      @DanielSallery Před rokem +1

      @@saadehsan894 If you get it to work I'd appreciate the help. I have code written above in the comments. Got ChatGPT working inside CMD. Slowly getting there

  • @latlov
    @latlov Před rokem +1

    How do you make a similar app connected to a MySQL database, so that chatgpt can answer your questions about any info contained in that database?