Skip to main content

An AI-powered voice bot using OpenAI Realtime API

Project description

AI Voice Bot

This project is an AI-powered voice bot built using OpenAI's Realtime API. It allows for real-time voice interaction through a command-line interface (CLI) and can be modified to handle text output, as well as include a mocked version for cost-effective testing.

Project Structure

  • ai_voice_bot/: Contains the main implementation of the voice bot.
├───ai_voice_bot
│   ├───client
│   │   └───__pycache__
│   ├───handlers
│   │   └───__pycache__
│   ├───mock
│   │   └───__pycache__
│   └───__pycache__
  • misc/: Directory for miscellaneous files.
  • .gitignore: Specifies which files should be ignored by Git.
  • LICENSE: The project's license file.
  • README.md: The README file that you're reading right now.
  • install.bat: A batch script for setting up the environment.
  • mock_bot.py: A mock version of the bot for testing without using the API.
  • push.bat: A batch script for pushing changes to GitHub.
  • setup.py: The setup script for packaging and distributing the project.
  • text_bot.py: The script for handling text-based output from the bot.
  • voice_bot.py: The script for handling voice-based interaction.

Features

  • Voice Interaction: The bot supports real-time voice input and can generate real-time responses using OpenAI's Realtime API.
  • Text-Based Interaction: You can modify the bot to handle text input and output instead of voice, allowing for more versatile use cases.
  • Mock Bot: The mock bot allows for testing and development without incurring costs from the API.

Installation

To install this project, clone the repository and run the following commands:

git clone https://github.com/myaichat/ai_voice_bot.git
cd ai_voice_bot
pip install -e .

Usage

Voice Interaction

To start the voice interaction bot, run the following command:

python voice_bot.py

Text-Based Interaction

To start the text-based interaction bot, run the following command:

python text_bot.py

Mock Bot

To run the mock bot for testing, use the following command:

python mock_bot.py

Building the Project

To build the project and create a wheel distribution:

pip install wheel
python setup.py sdist bdist_wheel

You can find the built wheel file in the dist/ folder.

Contributing

Contributions are welcome! Feel free to open issues or submit pull requests.

License

This project is licensed under the MIT License - see the LICENSE file for details.

References

https://github.com/run-llama/openai_realtime_client

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ai-voice_bot-1.0.1.tar.gz (17.3 kB view details)

Uploaded Source

Built Distribution

ai_voice_bot-1.0.1-py3-none-any.whl (39.2 kB view details)

Uploaded Python 3

File details

Details for the file ai-voice_bot-1.0.1.tar.gz.

File metadata

  • Download URL: ai-voice_bot-1.0.1.tar.gz
  • Upload date:
  • Size: 17.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.11

File hashes

Hashes for ai-voice_bot-1.0.1.tar.gz
Algorithm Hash digest
SHA256 d120888b6e54112873bad17e64926c6a62e002eb97bfe743348886df8d1763d9
MD5 4db18e11128beed7f45d997aafe26c92
BLAKE2b-256 0cb8eaafc4ee3a091a2a11e8f2c2870554072f005ff48c1e21a7c070cabd8e52

See more details on using hashes here.

File details

Details for the file ai_voice_bot-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: ai_voice_bot-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 39.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.11

File hashes

Hashes for ai_voice_bot-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4c2e2c6b8f1801841383daee96c6542968e34d6fe442c90ef803782958b94eba
MD5 ba98fdda4b6b090cbde66e3b40e24eec
BLAKE2b-256 535255a254c0808217d090fd16f0b48a06fefa24e2661ba3acced80ade1ba8d6

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page