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.
The process is simple and automated:
- Text-to-Speech: Your prompt from a text file is converted into speech using the OpenAI API.
- Prompt Playback: The generated audio is played on a virtual audio device, which your target AI model should be listening to.
- 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.
- Python 3.9+
- VB-CABLE Virtual Audio Device (or another virtual audio cable)
- An OpenAI API Key
⚠️ VoiceBreaker currently works only on Windows. Support for macOS and Linux is planned for the future.
- 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-
Install VB-CABLE: Download and install the virtual audio cable from the developer's website.
-
Set up the
.envfile: After cloning, you will find a file named.env.examplein the project root. Rename this file to.envand open it in your text editor. Set your OpenAI API key as shown below:# .env file OPENAI_API_KEY="sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
-
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.
Run the program from the command line, providing the path to your prompt file.
python main.py --prompt-file path/to/prompt.txt