How To Create ChatGPT Virtual Assistant With Python

Sdílet
Vložit
  • čas přidán 21. 07. 2024
  • In this video, I'll share how to create a virtual assistant with ChatGPT that understands your speech, is able to speak back, and has some personality to flavor things up.
    The code I'll go through is written in Python, and libraries are also for Python, but since video is not too long, you might find it useful basis for other programming languages as well.
    I'll also elaborate a bit on my choice of text-to-speech library, and some tinkering that can be done on OpenAI API level, system level instructions, and some other details you might find interesting.
    Code uses ChatGPT 3.5 Turbo model, but of course same principles will work if you have access to GPT 4.0 or later GPT 5.0 versions.
    As always, appreciate any commments, feedback, and please click that thumbs-up button if you like the video at any point. Of course subscribe to my channel if you would like to see more.
    Libraries I used (If you want to carry along with the experiment):
    - OpenAI API and Python library github.com/openai/openai-python
    - Python SpeechRecognition with Google Speech Recognition pypi.org/project/SpeechRecogn...
    - github.com/coqui-ai/TTS
    - pypi.org/project/python-dotenv/
    Code shown in the video:
    gist.github.com/crystoll/95b3...

Komentáře • 6

  • @TraeGeorge
    @TraeGeorge Před 9 měsíci +1

    How were you able to change the AI’s Voice

    • @DevXplaining
      @DevXplaining  Před 9 měsíci

      Hah, that's what I spend most of the time with, tinkering with the AI voice. The codebase used here uses a large library with lots of custom voices, so you can freely choose the voice and accent. The code and libs used are linked under the other comment here (and video description), in case you want to take a look. The library I ended up using was CoquiTTS.

    • @TraeGeorge
      @TraeGeorge Před 9 měsíci

      @@DevXplaining thank you so much I’ve been looking for something like this for awhile

  • @Jungh0ul
    @Jungh0ul Před rokem +1

    can you please copy and paste the code so i can have it

    • @DevXplaining
      @DevXplaining  Před rokem

      Well, sure, it's nothing special, just a POC. But here you go: gist.github.com/crystoll/95b3d0c42e5f4d4c945d887bcd60ecfa
      Note: Some assembly of course required, you do need to set up the API keys, python libraries, etc, so this is just kind of inspiration. But I use this for fun assistant now and then. Got an idea to take this further next.

    • @skierx10906
      @skierx10906 Před 6 měsíci

      Brian you will hear from him soon I speak only in riddles as to not give something away