Skip to content

TLBC-pl/VoiceBreaker

Repository files navigation

🎤 VoiceBreaker 🔓

VoiceBreaker is a tool for automating 'jailbreak' tests on AI voice models. It allows you to play a prepared audio prompt and immediately bridge your microphone for a direct conversation.

How It Works

The process is simple and automated:

  1. Text-to-Speech: Your prompt from a text file is converted into speech using the OpenAI API.
  2. Prompt Playback: The generated audio is played on a virtual audio device, which your target AI model should be listening to.
  3. Microphone Bridge: After playback is complete, the program automatically forwards the audio from your real microphone to the virtual device. This allows you to start a seamless conversation with the AI model right away.

Requirements

⚠️ VoiceBreaker currently works only on Windows. Support for macOS and Linux is planned for the future.

Installation and Configuration

  1. Clone the repository and install dependencies:
git clone https://github.com/TLBC-pl/VoiceBreaker.git
cd voicebreaker
python -m venv .venv
.\.venv\Scripts\activate
pip install -r requirements.txt
  1. Install VB-CABLE: Download and install the virtual audio cable from the developer's website.

  2. Set up the .env file: After cloning, you will find a file named .env.example in the project root. Rename this file to .env and open it in your text editor. Set your OpenAI API key as shown below:

    # .env file
    OPENAI_API_KEY="sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
  3. Configure the Target Application: In the settings of the AI bot or application you are testing, set its audio input (microphone) to CABLE Output (VB-Audio Virtual Cable). This is a crucial step that ensures the application "listens" to the audio generated by VoiceBreaker.

VB-CABLE config screenshot

Usage

Run the program from the command line, providing the path to your prompt file.

python main.py --prompt-file path/to/prompt.txt

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages