Giter VIP home page Giter VIP logo

adri6336 / gpt-voice-conversation-chatbot Goto Github PK

View Code? Open in Web Editor NEW
294.0 3.0 50.0 3 MB

Allows you to have an engaging and safely emotive spoken / CLI conversation with the AI ChatGPT / GPT-4 while giving you the option to let it remember things discussed.

License: GNU General Public License v3.0

Python 98.58% Batchfile 1.42%
chatbot gpt-3 openai speech-to-text speech-recognition tts elevenlabs conversational-ai voice-recognition memory conversational conversational-bots personalized user-friendly chatgpt python ai customizable cli gpt-4

gpt-voice-conversation-chatbot's Introduction

For a similar version for your Android smartwatch, see my other repo GPT-Assistants-Interlink. This project takes advantage of OpenAI's assistants API.

gpt-voice-conversation-chatbot (GPT-VCC) (formerly GPT3-STTC)

(Made for old completion engine and retrofitted for ChatGPT. Not as good as modern stuff. Keep looking.)

This is a bot that allows you to have an engaging and safely emotive spoken conversation with ChatGPT or GPT-4 using your microphone. If you'd prefer to type rather than speak, you can also converse with the bot via the terminal.

The tool uses a modified GPT chat preset, handles keeping track of the conversation, and uses ChatGPT's API by default. You can tell GPT something and it will remember what you said for the session and you can also have the bot develop a memory of you over time if you'd like. Despite limitations based on GPT's max token count, GPT-VCC should still be able to converse with you for as long as you'd like without losing awareness about what you've talked about. In order to use this tool, you will need a valid OpenAI API key.

The bot requires OpenAI's moderation and GPT APIs to be working properly without too much latency. You can find the status here: https://status.openai.com/

The releases should be stable, as far as previous testing goes, but will not have all of the newest features. If you would like to have all the features as listed here, clone the repository and run 'git pull' every now and then. This will get you the newest features and bug fixes as they come, but it could be unstable.

image

(Note: wiseTech is the name my bot instance chose for itself)

Installing

First off, you'll need an OpenAI API key. You can create an account to get an API key here: https://openai.com/api/ .

Once you sign in, press on the circle next to the text "Personal" in the upper right corner. Then press "View API keys".

Press "Create new secret key", then save that key. That's the key you'll need to run GPT-VCC. Paste it in the keys txt file included in the following way:

OpenAI_Key={paste here without brackets}

Go to the "Billing" tab towards the left of the screen. Start a payment plan when you run out of free credit to keep using GPT-VCC.

Windows

  1. Download Python at https://www.python.org/

  2. Download this repo either via the releases, git cloning the repo, or pressing the code button towards the upper right and pressing "Download ZIP".

  3. Extract contents, then move into folder with the files.

  4. If you have Windows Terminal installed, right click the empty part of the folder and select 'Open in Terminal'. Otherwise, use Win + R and enter powershell. Once you're in a terminal window and at the proper directory, use "pip install -r requirements.txt --upgrade". If this is done successfully, you should be ready to go as soon as you get yourself an OpenAI API key.

  5. Follow the steps listed in Using GPT-VCC

Linux (Debian / Ubuntu based)

  1. Install pip3

     sudo apt install python3-pip
    
  2. Download this repo either via the releases, git cloning the repo, or pressing the code button towards the upper right and pressing "Download ZIP".

  3. Extract files, move into directory, open requirements.txt, and delete pyaudio==0.2.13 from file. Make it look like it was never there, preserving the original formatting.

  4. Download pyaudio with apt as follows:

     sudo apt install python3-pyaudio
    
  5. Download espeak with apt as follows (needed for interface communication):

     sudo apt install espeak
    
  6. Download other requirements with pip as follows:

     pip3 install -r requirements.txt --upgrade
    
  7. Follow the steps listed in Using GPT-VCC

Using GPT-VCC

To use this chatbot, enter the following command once you've navigated to the bot's folder (replacing <key> with your api key):

python main.py <key>

For convenience, you can also just enter the key into the keys.txt file. When you run the script, the bot will automatically read this file and load the key.

A Pygame gui will pop up; its colors represent the state of the bot. The color red indicates that the bot is not listening. To make the bot listen to you, press space. The color will then turn to yellow when its loading, then green when it's listening. Speak freely when the color is green, your speech will be recorded, converted to text, then fed to GPT if it is in compliance with OpenAI's policies. When GPT is ready to reply, the screen will turn blue.

If you would like to use the terminal, run gptcli.py instead using the same syntax (having keyfile also works):

python gptcli.py <key>

If you would like to use ElevenLabs TTS, you must enter your personal ElevenLabs api key following your OpenAI api key as follows or fill in the key in the key file:

    python main.py <OpenAI key> <ElevenLabs TTS key>

If you don't want to use the fancy TTS, this bot will automatically use Google's TTS.

Content Moderation

The moderation uses both OpenAI's moderation tool and NLTK. Combined, they hope to prevent the use of GPT that is outside of OpenAI's useage policy. This is not an infaliable method though, so please exercise caution with what you give GPT.

Please note that outages or latency problems with the moderation api will prevent you from using this chatbot. If you must talk with the bot while OpenAI is having issues, please edit the chatbot.py file to exclude the "not self.flagged_by_openai(text)" condition. I do not recommend this though.

Cloned / Alternate ElevenLabs Voices

You can now use alternate voices if you wish using an argument passed when starting the program. In the future a more fleshed out way to do this is planned. For now, you'll need to know the ID of the voice you want to use (you can find a list of the base voice ID's here). Once you know that ID, use it as follows with the example ID "21m00Tcm4TlvDq8ikWAM" for Rachel:

    python main.py --voice_id 21m00Tcm4TlvDq8ikWAM

To use cloned voices, do the following:

  1. Go to the voice lab at https://beta.elevenlabs.io/voice-lab and create a custom voice.

  2. Once you've got a voice cloned, go here https://api.elevenlabs.io/docs#/voices/Get_voices_v1_voices_get .

  3. Press "Try It Out", enter your API key into the box, then press "Execute".

  4. Below the execute button, you'll see a box labeled "Response body". Scroll down in this box until you find the voice you named. Get the "voice_id" that's directly above it, and use it as in the above example.

Controls

Keyboard

  • SPACEBAR: This starts and stops a recording. Whatever you say will be then transcribed and sent to GPT (if it passes filters) once you press space a second time.

  • ESCAPE: This exits without memorizing.

  • Q: This quits and has bot remember details about you and your conversations (data is saved in the text file called memories.txt)

  • P: This is a depreciated command to cancel a message. Now just say, "please cancel a message" while recording to cancel.

Voice Commands

  • Say 'please set tokens to #': When the bot recognizes this phrase, it will try to set the max_tokens of the reply to the value you specified.

  • Say 'speak like a robot': This will set all responses from GPT to be spoken with a robotic TTS program that works offline. In CLI mode, enter '!robospeak()' to toggle this mode.

  • Say 'stop speaking like a robot': This will revert bot's TTS to whatever you had before (either Google or ElevenLabs TTS). In CLI mode, enter '!robospeak()' to toggle this mode.

  • Say 'please display conversation': This will output your entire conversation to the terminal window.

  • Say 'please display memories': This will provide an output of all memories saved into long term storage.

  • Say 'please restore memory': This will attempt to repair the working memory of the bot by consolidating a certain number of memories from the long term storage .

  • Say 'please set preset to': This will set the preset (a text string given to AI at start of every conversation) for the bot. For example, the preset 'speak like a pirate' makes AI speak like a pirate. You can find example presets here: https://github.com/Adri6336/gpt-voice-conversation-chatbot/wiki/Example-Presets .

  • Say 'please reset preset': This will delete the preset you made.

  • Say 'please set name to': This will set the name of the bot to whatever you specify, so long as it is in accordance with OpenAI's usage policies. After setting name, the bot will refer to itself by the name you set.

  • Say 'please toggle gpt4': This will toggle between ChatGPT and GPT-4 models. On start up, your switch will be preserved. In CLI mode, enter '!gpt4()' to toggle the model.

  • Say 'please set creativity to': This will set the bot's default randomness to a value you specify between 1 and 15 (used to be 9). In CLI mode, use '!creativity(#)' where the # sign is a value between 0.01 and 1.5.

  • Say 'please list commands': This will have the bot list out the available commands for you.

  • Say 'please toggle ElevenLabs': This will toggle the bot's use of ElevenLabs TTS on and off. In CLI mode, use !11ai() to toggle it.

  • Say 'please cancel message': This will cancel the message, preventing it from being sent to GPT.

Features

  • Have a personalized conversation with ChatGPT or GPT-4

  • Hear GPT talk to you with Google's TTS tool (will pronounce accents accurately if it can), in ElevenLab's life-like TTS (if you have a valid api key), or as a robot (say "speak like a robot" to activate)

  • Speak with GPT outloud using Google's speech recognition tech

  • Bot will remember things about you if you close with the 'Q' key

  • See GPT's replies as text in the terminal window. Most UTF-32 characters (like Chinese and Arabic text) will also be printed

  • Automatically save conversations to a file on your disk to help you keep track of what you've talked about

  • Save a custom preset to have an experience better suited for you and your needs

  • Customize the bot's name

  • Customize the bot's creativity

  • Chat with GPT via the terminal (Windows and Linux)

Example Use Cases

  • Converse with bot recreationally

  • Use bot to practice a language by a setting preset to talk to you in that language like a teacher and hear responses with proper pronounciation using Google's TTS. If you'd prefer, you can also stick with ElevenLabs's multilingual voice

  • Have bot help you practice programming by asking you questions and giving feedback on your code

  • Ask bot questions over various things that pop up

  • Ask bot to help you with writing cover letters and descriptions

Example Videos of gptcli.py

ElevenLabs Voice Demonstration

main-slim.mp4



Google TTS Spanish Voice Demonstration

spanish-slim.mp4

gpt-voice-conversation-chatbot's People

Contributors

adri6336 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

gpt-voice-conversation-chatbot's Issues

Error when run project on Mac intel

I have followed the instructions to install this project. I am using macOS with an Intel chip.
However, when I run "python main.py," I encounter an error.
pygame 2.5.2 (SDL 2.28.3, Python 3.11.0) Hello from the pygame community. https://www.pygame.org/contribute.html Traceback (most recent call last): File "/Users/phungvuong/Documents/coding/TestCode/chatgpt/Talk/gpt-voice-conversation-chatbot/main.py", line 8, in <module> from chatbot import * File "/Users/phungvuong/Documents/coding/TestCode/chatgpt/Talk/gpt-voice-conversation-chatbot/chatbot.py", line 11, in <module> from tts_functions import * File "/Users/phungvuong/Documents/coding/TestCode/chatgpt/Talk/gpt-voice-conversation-chatbot/tts_functions.py", line 11, in <module> from elevenlabs import generate, play, save ImportError: cannot import name 'generate' from 'elevenlabs' (/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/elevenlabs/__init__.py)

Bot listening - can it listen continously?

Hi again :)

So I wonder if it's feasible to make it so the bot is continuously listening to the mic, instead of triggering the recording for every prompt?
The conversation would feel much more natural and fluid if it didn't require pressing any buttons.
Perhaps you are familiar with Neuro-sama AI VTuber which seems to listen to conversation partners all the time but since its creator made it its job, he doesn't want to share details how it works exactly.

Perhaps to start with we could have it so after the TTS of choice stops talking back to us, automatically triggers recording again?
I think it would require either removing the time window during which you need to say your prompt as currently recording stops after short while if you don't speak or at least prolonging that window significantly.

Just some food for thoughts. I really like the project and would love to see it grow and get even better than it already is!

processing time of prompts is really long

Hello Adri6336 :D

I absolutely love your program, it includes everything i want pretty much, but the processing time of a prompt takes about 5 seconds every time.

Is there anything you can do to improve this delay?

Also, is there any way to choose a elevenlabs voice?

tyvm in advance!

Audio transcription super slow right now

Hi Adrian

I noticed it was taking ages for the transcription to happen, so I've just downloaded your most recent version, but it is still taking a very long time (up to a minute or longer for a short phrase). It often also just gets "stuck" in listening mode (green window) for a very long time.

What could be the cause?

Many thanks

short speech recognition

When I press and hold space and start speaking, once I pause and start thinking about how to speak, soon, the conversation mode will be closed and the conversation will be submitted to chatgpt. This is very unnatural, shouldn't it wait for the user to release the space before handing over what the user said to chatgpt? Just a little advice. I like your project, but there do exist some problems.

(macOS) No Pygame gui pop up

After the initial welcome message from the AI, there's no pop up or way for me to record an input.

Any idea on a fix for this?

Custom ElevenLab Voices

Mentioned in #1, but I do want to use a custom voice.

url = "https://api.elevenlabs.io/v1/text-to-speech/EXAVITQu4vr4xnSDxMaL"

Its actually pretty simple, if the user knows their voice ID which they can query the endpoint themselves for, they just swap EXAVITQu4vr4xnSDxMaL` with it. This works.

I could probably submit a PR for it myself, but how should I pass it in? Do you perhaps want to use argparse to parse the args as it is a bit cleaner than checking the length of argv and assuming positions and the like.

Edit: I am going to try to do some refactoring in general if that is okay, as you have a bunch of duplicated code between gptcli and main.py.

Does this work on Mac?

I saw the instructions only mention Windows + Linux, but figured I'd try it out anyway. I installed espeak with brew, but when I run main.py I get this trace:

Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/local/Cellar/[email protected]/3.9.9/Frameworks/Python.framework/Versions/3.9/lib/python3.9/threading.py", line 973, in _bootstrap_inner
    self.run()
  File "/usr/local/Cellar/[email protected]/3.9.9/Frameworks/Python.framework/Versions/3.9/lib/python3.9/threading.py", line 910, in run
    self._target(*self._args, **self._kwargs)
  File "/Users/zswitten/gpt-voice-conversation-chatbot/main.py", line 98, in main_loop
    self.display = pygame.display.set_mode((500, 500), pygame.RESIZABLE)
pygame.error: NSWindow drag regions should only be invalidated on the Main Thread!
Assertion failed: (NSViewIsCurrentlyBuildingLayerTreeForDisplay() != currentlyBuildingLayerTree), function NSViewSetCurrentlyBuildingLayerTreeForDisplay, file NSView.m, line 13477.
Illegal instruction: 4

How to setup microphone?

I have this project running on Ubuntu Server 22 VM if it matters. I also connected to Windows 11 via ssh, but it doesn't detect the microphone either.
Is the mic detected automatically from the system or do I have to mark something manually? Or I have to run it on a desktop machine.

vm@ai:/python/gpt-voice-conversation-chatbot$ python3 main.py
pygame 2.1.2 (SDL 2.0.16, Python 3.10.6)
Hello from the pygame community. https://www.pygame.org/contribute.html
[OK] NLTK Loaded
ALSA lib confmisc.c:855:(parse_card) cannot find card '0'
ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_card_inum returned error: No such file or directory
ALSA lib confmisc.c:422:(snd_func_concat) error evaluating strings
ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1334:(snd_func_refer) error evaluating name
ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5701:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM sysdefault
ALSA lib confmisc.c:855:(parse_card) cannot find card '0'
ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_card_inum returned error: No such file or directory
ALSA lib confmisc.c:422:(snd_func_concat) error evaluating strings
ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1334:(snd_func_refer) error evaluating name
ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5701:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM sysdefault
ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.front
ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround21
ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround21
ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround40
ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround41
ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround50
ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround51
ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround71
ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958
ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958
ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958
ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib confmisc.c:855:(parse_card) cannot find card '0'
ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_card_inum returned error: No such file or directory
ALSA lib confmisc.c:422:(snd_func_concat) error evaluating strings
ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1334:(snd_func_refer) error evaluating name
ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5701:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM default
ALSA lib confmisc.c:855:(parse_card) cannot find card '0'
ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_card_inum returned error: No such file or directory
ALSA lib confmisc.c:422:(snd_func_concat) error evaluating strings
ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1334:(snd_func_refer) error evaluating name
ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5701:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM default
ALSA lib confmisc.c:855:(parse_card) cannot find card '0'
ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_card_id returned error: No such file or directory
ALSA lib confmisc.c:422:(snd_func_concat) error evaluating strings
ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1334:(snd_func_refer) error evaluating name
ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5701:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM dmix
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
Traceback (most recent call last):
  File "/python/gpt-voice-conversation-chatbot/main.py", line 505, in <module>
    gui = GUI()
  File "/python/gpt-voice-conversation-chatbot/main.py", line 103, in __init__
    self.mic = sr.Microphone()
  File "/home/vm/.local/lib/python3.10/site-packages/speech_recognition/__init__.py", line 99, in __init__
    device_info = audio.get_device_info_by_index(device_index) if device_index is not None else audio.get_default_input_device_info()
  File "/usr/lib/python3/dist-packages/pyaudio.py", line 949, in get_default_input_device_info
    device_index = pa.get_default_input_device()
OSError: No Default Input Device Available

Latency - can it be improved?

Hi there,

I wanted to check if it's possible to reduce the latency so the conversations are more natural and fluid. Currently there is around 30 seconds delay between I finish my input (bot no longer listens and goes blue color) and the output answer from Elevenlabs.
I tested the default TTS and the response time was about half of that so I assume it's just because of Elevanlabs but I am no programmer so I don't know if this can be anyhow improved on your end.

Note - paid version of OpenAI (ChatGPT Plus) says that the response is faster. Do you know how significant uplift this may give in this case?

Compile errors in Windows with Python 3.11.2

Hi Friend,

Thank you for this. I tried to compile it in PS / Windows 11 and latest version of Python 3.11.2.

On another machine, I tried with 3.7.16. Seemed to work better but still got path errors, although I believe that is MY fault. Will uninstall 3.11.2 and reinstall full 3.7.16, update and run "pip install -r requirements.txt.

Here is the error I received.

PS C:\temp\gptVoice> pip install -r requirements.txt
Collecting playsound==1.2.2
Using cached playsound-1.2.2-py2.py3-none-any.whl (6.0 kB)
Collecting gTTS==2.3.1
Using cached gTTS-2.3.1-py3-none-any.whl (28 kB)
Collecting SpeechRecognition==3.9.0
Using cached SpeechRecognition-3.9.0-py2.py3-none-any.whl (32.8 MB)
Collecting pygame==2.1.2
Using cached pygame-2.1.2.tar.gz (10.1 MB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error

× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [77 lines of output]

  WARNING, No "Setup" File Exists, Running "buildconfig/config.py"
  Using WINDOWS configuration...

  Traceback (most recent call last):
    File "<string>", line 2, in <module>
    File "<pip-setuptools-caller>", line 34, in <module>
    File "C:\Users\Corbin\AppData\Local\Temp\pip-install-uki_18n4\pygame_e253ab220ecf45f9bcdaee7a217e2017\setup.py", line 359, in <module>
      buildconfig.config.main(AUTO_CONFIG)
    File "C:\Users\Corbin\AppData\Local\Temp\pip-install-uki_18n4\pygame_e253ab220ecf45f9bcdaee7a217e2017\buildconfig\config.py", line 225, in main
      deps = CFG.main(**kwds)
             ^^^^^^^^^^^^^^^^
    File "C:\Users\Corbin\AppData\Local\Temp\pip-install-uki_18n4\pygame_e253ab220ecf45f9bcdaee7a217e2017\buildconfig\config_win.py", line 511, in main
      return setup_prebuilt_sdl2(prebuilt_dir)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "C:\Users\Corbin\AppData\Local\Temp\pip-install-uki_18n4\pygame_e253ab220ecf45f9bcdaee7a217e2017\buildconfig\config_win.py", line 471, in setup_prebuilt_sdl2
      DEPS.configure()
    File "C:\Users\Corbin\AppData\Local\Temp\pip-install-uki_18n4\pygame_e253ab220ecf45f9bcdaee7a217e2017\buildconfig\config_win.py", line 336, in configure
      from . import vstools
    File "C:\Users\Corbin\AppData\Local\Temp\pip-install-uki_18n4\pygame_e253ab220ecf45f9bcdaee7a217e2017\buildconfig\vstools.py", line 11, in <module>
      compiler.initialize()
    File "C:\Users\Corbin\AppData\Local\Programs\Python\Python311\Lib\site-packages\setuptools\_distutils\msvc9compiler.py", line 403, in initialize
      vc_env = query_vcvarsall(VERSION, plat_spec)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "C:\Users\Corbin\AppData\Local\Programs\Python\Python311\Lib\site-packages\setuptools\_distutils\msvc9compiler.py", line 281, in query_vcvarsall
      raise DistutilsPlatformError("Unable to find vcvarsall.bat")
  distutils.errors.DistutilsPlatformError: Unable to find vcvarsall.bat
  Making dir :prebuilt_downloads:
  Downloading... https://www.libsdl.org/release/SDL2-devel-2.0.18-VC.zip ed561079ec622b0bab5a9e02976f5d540b0622da
  Unzipping :prebuilt_downloads\SDL2-devel-2.0.18-VC.zip:
  Downloading... https://www.libsdl.org/projects/SDL_image/release/SDL2_image-devel-2.0.5-VC.zip 137f86474691f4e12e76e07d58d5920c8d844d5b
  Unzipping :prebuilt_downloads\SDL2_image-devel-2.0.5-VC.zip:
  Downloading... https://www.libsdl.org/projects/SDL_ttf/release/SDL2_ttf-devel-2.0.15-VC.zip 1436df41ebc47ac36e02ec9bda5699e80ff9bd27
  Unzipping :prebuilt_downloads\SDL2_ttf-devel-2.0.15-VC.zip:
  Downloading... https://www.libsdl.org/projects/SDL_mixer/release/SDL2_mixer-devel-2.0.4-VC.zip 9097148f4529cf19f805ccd007618dec280f0ecc
  Unzipping :prebuilt_downloads\SDL2_mixer-devel-2.0.4-VC.zip:
  Downloading... https://www.pygame.org/ftp/jpegsr9d.zip ed10aa2b5a0fcfe74f8a6f7611aeb346b06a1f99
  Unzipping :prebuilt_downloads\jpegsr9d.zip:
  Downloading... https://pygame.org/ftp/prebuilt-x64-pygame-1.9.2-20150922.zip 3a5af3427b3aa13a0aaf5c4cb08daaed341613ed
  Unzipping :prebuilt_downloads\prebuilt-x64-pygame-1.9.2-20150922.zip:
  copying into .\prebuilt-x64
  Path for SDL: prebuilt-x64\SDL2-2.0.18
  ...Library directory for SDL: prebuilt-x64/SDL2-2.0.18/lib/x64
  ...Include directory for SDL: prebuilt-x64/SDL2-2.0.18/include
  Path for FONT: prebuilt-x64\SDL2_ttf-2.0.15
  ...Library directory for FONT: prebuilt-x64/SDL2_ttf-2.0.15/lib/x64
  ...Include directory for FONT: prebuilt-x64/SDL2_ttf-2.0.15/include
  Path for IMAGE: prebuilt-x64\SDL2_image-2.0.5
  ...Library directory for IMAGE: prebuilt-x64/SDL2_image-2.0.5/lib/x64
  ...Include directory for IMAGE: prebuilt-x64/SDL2_image-2.0.5/include
  Path for MIXER: prebuilt-x64\SDL2_mixer-2.0.4
  ...Library directory for MIXER: prebuilt-x64/SDL2_mixer-2.0.4/lib/x64
  ...Include directory for MIXER: prebuilt-x64/SDL2_mixer-2.0.4/include
  Path for PORTMIDI: prebuilt-x64
  ...Library directory for PORTMIDI: prebuilt-x64/lib
  ...Include directory for PORTMIDI: prebuilt-x64/include
  DLL for SDL2: prebuilt-x64/SDL2-2.0.18/lib/x64/SDL2.dll
  DLL for SDL2_ttf: prebuilt-x64/SDL2_ttf-2.0.15/lib/x64/SDL2_ttf.dll
  DLL for SDL2_image: prebuilt-x64/SDL2_image-2.0.5/lib/x64/SDL2_image.dll
  DLL for SDL2_mixer: prebuilt-x64/SDL2_mixer-2.0.4/lib/x64/SDL2_mixer.dll
  DLL for portmidi: prebuilt-x64/lib/portmidi.dll
  Path for FREETYPE not found.
  ...Found include dir but no library dir in prebuilt-x64.
  Path for PNG not found.
  ...Found include dir but no library dir in prebuilt-x64.
  Path for JPEG not found.
  ...Found include dir but no library dir in prebuilt-x64.
  DLL for freetype: prebuilt-x64/SDL2_ttf-2.0.15/lib/x64/libfreetype-6.dll

  ---
  For help with compilation see:
      https://www.pygame.org/wiki/CompileWindows
  To contribute to pygame development see:
      https://www.pygame.org/contribute.html
  ---

  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

Generated audio fails to play after 3rd audio

This could be a problem on my end, please excuse me if that's the case but Im new to this.

I have to run MVS as admin to make the playback work (Im not using Eleven Labs api), but it only generates three audio files and then starts giving the following error:

` Error 259 for command:
play ./messages/3-5-2023/6.mp3 wait
The driver cannot recognize the specified command parameter.

Error 263 for command:
    close ./messages/3-5-2023/6.mp3
The specified device is not open or is not recognized by MCI.

Failed to close the file: ./messages/3-5-2023/6.mp3
[i]: DETECTED LANGUAGE: en
[X] Error trying to speak: [Errno 13] Permission denied: './messages/3-5-2023/6.mp3'`

Custom ElevenLabs Voices

Hey there! Awesome work =)

  • Could you add support for using Custom Cloned Elevenlabs voices? Thank You!
  • It would also be cool to have an 'always listening' option to toggle (or say out loud)
  • Ability to automatically select Elevenlabs as the default on launch (I'm unable to switch back to Elevenlabs after restarting even with the voice command for some reason)

My intention is to use this as an easy gateway for creating an A.I Virtual Content Creator like Neuro-Sama / or Nothing, Forever
https://www.youtube.com/watch?v=yn0iVOtr6FE&t=120s | https://youtu.be/jAWS3K_3jqQ?t=58

distutils.errors.DistutilsPlatformError: Unable to find vcvarsall.bat

I cannot get it to work both on my stationary PC and on laptop. I got the same error:

File "C:\Program Files\Python311\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 353, in
main()
File "C:\Program Files\Python311\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Python311\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 118, in get_requires_for_build_wheel
return hook(config_settings)
^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\drago\AppData\Local\Temp\pip-build-env-1aa9hrdo\overlay\Lib\site-packages\setuptools\build_meta.py", line 355, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=['wheel'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\drago\AppData\Local\Temp\pip-build-env-1aa9hrdo\overlay\Lib\site-packages\setuptools\build_meta.py", line 325, in _get_build_requires
self.run_setup()
File "C:\Users\drago\AppData\Local\Temp\pip-build-env-1aa9hrdo\overlay\Lib\site-packages\setuptools\build_meta.py", line 507, in run_setup
super(_BuildMetaLegacyBackend, self).run_setup(setup_script=setup_script)
File "C:\Users\drago\AppData\Local\Temp\pip-build-env-1aa9hrdo\overlay\Lib\site-packages\setuptools\build_meta.py", line 341, in run_setup
exec(code, locals())
File "", line 359, in
File "C:\Users\drago\AppData\Local\Temp\pip-install-zpsl8dp8\pygame_9bb69c7b58aa4ce08e8462093e7d1456\buildconfig\config.py", line 225, in main
deps = CFG.main(**kwds)
^^^^^^^^^^^^^^^^
File "C:\Users\drago\AppData\Local\Temp\pip-install-zpsl8dp8\pygame_9bb69c7b58aa4ce08e8462093e7d1456\buildconfig\config_win.py", line 511, in main
return setup_prebuilt_sdl2(prebuilt_dir)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\drago\AppData\Local\Temp\pip-install-zpsl8dp8\pygame_9bb69c7b58aa4ce08e8462093e7d1456\buildconfig\config_win.py", line 471, in setup_prebuilt_sdl2
DEPS.configure()
File "C:\Users\drago\AppData\Local\Temp\pip-install-zpsl8dp8\pygame_9bb69c7b58aa4ce08e8462093e7d1456\buildconfig\config_win.py", line 336, in configure
from . import vstools
File "C:\Users\drago\AppData\Local\Temp\pip-install-zpsl8dp8\pygame_9bb69c7b58aa4ce08e8462093e7d1456\buildconfig\vstools.py", line 11, in
compiler.initialize()
File "C:\Users\drago\AppData\Local\Temp\pip-build-env-1aa9hrdo\overlay\Lib\site-packages\setuptools_distutils\msvc9compiler.py", line 403, in initialize
vc_env = query_vcvarsall(VERSION, plat_spec)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\drago\AppData\Local\Temp\pip-build-env-1aa9hrdo\overlay\Lib\site-packages\setuptools_distutils\msvc9compiler.py", line 281, in query_vcvarsall
raise DistutilsPlatformError("Unable to find vcvarsall.bat")
distutils.errors.DistutilsPlatformError: Unable to find vcvarsall.bat
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

I tried installing MS C++, Visual Studio, but issue persists. Any ideas?

Language and speed.

It is possible to change the voice recognition to another language, currently there is only English.
Only handwriting recognition works, then google tts reads correctly, but very slowly.

response always got interrupted

I am not sure if thats chatgpt API problems? for example if I asked to tell a story, the results are always broken, as if there is a limit of words in reply.. and I have to type "continue" to resume the chat..

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.