Create a ChatGPT AI Voice Assistant using Python in 10 Minutes (OpenAI - Hello Jarvis)

แชร์
ฝัง
  • เผยแพร่เมื่อ 5 ม.ค. 2025

ความคิดเห็น • 27

  • @ScaleUpSaaS
    @ScaleUpSaaS  ปีที่แล้ว

    Feel free to ask Any question 👨‍💻?

    • @motherload1122
      @motherload1122 ปีที่แล้ว

      How can I define the Models Language & Male/Female? Where can I see what options I have.?

    • @motherload1122
      @motherload1122 ปีที่แล้ว

      Traceback (most recent call last):
      File "f:\Jarvis\openai-jarvis\app.py", line 36, in
      change_voice(engine, "en_US", "VoiceGenderMale")
      File "f:\Jarvis\openai-jarvis\app.py", line 34, in change_voice
      raise RuntimeError("Language '{}' for gender '{}' not found".format(language, gender))
      RuntimeError: Language 'en_US' for gender 'VoiceGenderMale' not found

    • @ScaleUpSaaS
      @ScaleUpSaaS  11 หลายเดือนก่อน

      Are you using MacOS?

  • @dhirajkahol
    @dhirajkahol 10 หลายเดือนก่อน +1

    Thanks for sharing this 👍. Can you suggest ideas on how to reduce assistant's response time ? to make the conversation more realistic

    • @ScaleUpSaaS
      @ScaleUpSaaS  10 หลายเดือนก่อน

      Yes. You can use local LLM. Try to search for privateGPT

  • @bi_jhoo3101
    @bi_jhoo3101 7 หลายเดือนก่อน +1

    Hi, nice video! do i have to use python? or I can use any programming language like nodejs.
    if I using nodejs i'm scared that the required packages doesn't exist in nodejs

    • @ScaleUpSaaS
      @ScaleUpSaaS  7 หลายเดือนก่อน

      Thanks for sharing. Appreciated.
      You can definitely try different programming languages. But we know for sure it’s working with the existing code base wish shared in this tutorial.
      Let us know if you have any more questions

  • @tarnum13
    @tarnum13 ปีที่แล้ว +2

    Great video, thank you 👋

    • @ScaleUpSaaS
      @ScaleUpSaaS  ปีที่แล้ว

      Thanks for sharing. Appreciated

  • @luongtran4077
    @luongtran4077 11 หลายเดือนก่อน +1

    Great video! But I encountered an error like the following.... Can you suggest me to fix it
    D:\AI\openai-jarvis>python3 app.py
    Traceback (most recent call last):
    File "D:\AI\openai-jarvis\app.py", line 36, in
    change_voice(engine, "en_US", "VoiceGenderFemale")
    File "D:\AI\openai-jarvis\app.py", line 34, in change_voice
    raise RuntimeError("Language '{}' for gender '{}' not found".format(language, gender))
    RuntimeError: Language 'en_US' for gender 'VoiceGenderFemale' not found

    • @ScaleUpSaaS
      @ScaleUpSaaS  11 หลายเดือนก่อน

      Just comment this line:
      # change_voice(engine, "en_US", "VoiceGenderFemale")
      It will work for you after

    • @ScaleUpSaaS
      @ScaleUpSaaS  11 หลายเดือนก่อน

      Or git clone the repository again. I added a try & except solution. It will work for for sure :)

    • @ScaleUpSaaS
      @ScaleUpSaaS  11 หลายเดือนก่อน

      Subscribe to our youtube channel if it's working for you :)

    • @luongtran4077
      @luongtran4077 11 หลายเดือนก่อน

      i git clone the responsitory again. I have added API key to copy.env file and changed the file name, added API key to line 13 file app.py . But i have a bug. like :
      (env) D:\AI\openai-jarvis>python3 app.py
      Language not found
      Press 's' to stop recording and transcribe the audio.
      Recording... Press 's' to stop.
      Traceback (most recent call last):
      File "D:\AI\openai-jarvis\app.py", line 121, in
      main()
      File "D:\AI\openai-jarvis\app.py", line 94, in main
      recorded_audio_path = new_record_audio()
      ^^^^^^^^^^^^^^^^^^
      File "D:\AI\openai-jarvis\app.py", line 56, in new_record_audio
      write(f'./voices/{audio_name}.wav', fs, myrecording) # Save as WAV file
      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "C:\Users\LUONG\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\scipy\io\wavfile.py", line 766, in write
      fid = open(filename, 'wb')
      ^^^^^^^^^^^^^^^^^^^^
      FileNotFoundError: [Errno 2] No such file or directory: './voices/melancholic sunrise.wav' @@ScaleUpSaaS

    • @ScaleUpSaaS
      @ScaleUpSaaS  11 หลายเดือนก่อน

      Create the folder -> voices@@luongtran4077

  • @vrmusic108
    @vrmusic108 11 หลายเดือนก่อน +2

    You can only use this API if you have paid account with OPENAI

    • @ScaleUpSaaS
      @ScaleUpSaaS  11 หลายเดือนก่อน

      Thanks for sharing. Appreciated. Subscribe for more amazing tutorials

    • @sv4647
      @sv4647 11 หลายเดือนก่อน +2

      Pls if you know of any other open source model that can do this without api key. Pls tell!!

    • @ScaleUpSaaS
      @ScaleUpSaaS  11 หลายเดือนก่อน +1

      ​@@sv4647 We will share once we find. What kind of functions you need?

  • @svascolapasta
    @svascolapasta 7 หลายเดือนก่อน +1

    Hey Nice video! But actually i got this error:
    Traceback (most recent call last):
    File "C:\Users\utente\OneDrive\Desktop\J.A.R.V.I.S\openai-jarvis-master\app.py", line 122, in
    main()
    File "C:\Users\utente\OneDrive\Desktop\J.A.R.V.I.S\openai-jarvis-master\app.py", line 104, in main
    transcript = speech_to_text(recorded_audio_path)
    File "C:\Users\utente\OneDrive\Desktop\J.A.R.V.I.S\openai-jarvis-master\app.py", line 65, in speech_to_text
    transcript = openai.Audio.transcribe("whisper-1", audio_file)
    File "C:\Users\utente\AppData\Local\Programs\Python\Python312\Lib\site-packages\openai\api_resources\audio.py", line 67, in transcribe
    response, _, api_key = requestor.request("post", url, files=files, params=data)
    File "C:\Users\utente\AppData\Local\Programs\Python\Python312\Lib\site-packages\openai\api_requestor.py", line 298, in request
    resp, got_stream = self._interpret_response(result, stream)
    File "C:\Users\utente\AppData\Local\Programs\Python\Python312\Lib\site-packages\openai\api_requestor.py", line 700, in _interpret_response
    self._interpret_response_line(
    File "C:\Users\utente\AppData\Local\Programs\Python\Python312\Lib\site-packages\openai\api_requestor.py", line 765, in _interpret_response_line
    raise self.handle_error_response(
    openai.error.RateLimitError: You exceeded your current quota, please check your plan and billing details. For more information on this error, read the docs: platform.openai.com/docs/guides/error-codes/api-errors.

    • @ScaleUpSaaS
      @ScaleUpSaaS  7 หลายเดือนก่อน

      Thanks for sharing. You need to add a new OpenAI Token. also make sure you added you credit card info to OpenAI too

    • @svascolapasta
      @svascolapasta 7 หลายเดือนก่อน

      i did it but it crashed with the same error

    • @ScaleUpSaaS
      @ScaleUpSaaS  7 หลายเดือนก่อน

      Have you try to refresh the cache or make sure your files have access to this open ai key. Also try to add the OpenAI token hardcoded to your file.
      We checked this code countless of times everything work well.

    • @svascolapasta
      @svascolapasta 7 หลายเดือนก่อน +1

      @@ScaleUpSaaS it worked, thank you bro :]

  • @26.nguyenhongquan69
    @26.nguyenhongquan69 11 หลายเดือนก่อน

    Hello, thanks for your helpful video but I have some problems. Can you help me fix them?
    Language not found
    Press 's' to stop recording and transcribe the audio.
    Recording... Press 's' to stop.
    Recording stopped.
    Recording stopped. Transcribing audio...
    Recorded audio saved to: ./voices/whispering rain.wav
    ----end---
    entered transcribe ././voices/whispering rain.wav
    Traceback (most recent call last):
    File "c:\Users\PC QUAN\Javiscode\openai-jarvis\app.py", line 121, in
    main()
    File "c:\Users\PC QUAN\Javiscode\openai-jarvis\app.py", line 103, in main
    transcript = speech_to_text(recorded_audio_path)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "c:\Users\PC QUAN\Javiscode\openai-jarvis\app.py", line 64, in speech_to_text
    transcript = openai.Audio.transcribe("whisper-1", audio_file)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "c:\Users\PC QUAN\Javiscode\openai-jarvis\menv\Lib\site-packages\openai\api_resources\audio.py", line 67, in transcribe
    response, _, api_key = requestor.request("post", url, files=files, params=data)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "c:\Users\PC QUAN\Javiscode\openai-jarvis\menv\Lib\site-packages\openai\api_requestor.py", line 298, in request
    resp, got_stream = self._interpret_response(result, stream)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "c:\Users\PC QUAN\Javiscode\openai-jarvis\menv\Lib\site-packages\openai\api_requestor.py", line 700, in _interpret_response
    self._interpret_response_line(
    File "c:\Users\PC QUAN\Javiscode\openai-jarvis\menv\Lib\site-packages\openai\api_requestor.py", line 765, in _interpret_response_line
    raise self.handle_error_response(
    openai.error.RateLimitError: You exceeded your current quota, please check your plan and billing details. For more information on this error, read the docs: platform.openai.com/docs/guides/error-codes/api-errors.

    • @ScaleUpSaaS
      @ScaleUpSaaS  11 หลายเดือนก่อน

      Thanks for sharing. Seems like your error caused by Missing OPENAI_API_KEY
      Check that you have a legit api key or your account have credit card.
      The code is fine. It’s need to work for you.