Introduction to the ChatWaifu Project
ChatWaifu is an innovative voice dialogue program that combines TTS (Text-to-Speech) with VITS technology, leveraging the capabilities of ChatGPT. This project offers a dynamic and interactive experience, allowing users to engage in conversation with virtual personas, often referred to as "waifus."
Features
ChatWaifu comes with a range of functionalities designed to enhance user interaction:
- ChatGPT-Based Dialogue: At its core, ChatWaifu uses ChatGPT to simulate engaging conversations.
- Voice Responses: The software converts text responses into voice, providing a more immersive experience.
- Multiple Voice Characters: Users can choose from various voice personas to interact with.
- Speech Recognition: Aiding in a more natural conversational flow, it features an advanced speech recognition system.
- Integration with Marai Bot: The program can connect with Marai, adding an additional layer of interaction.
- Live2D UI Version: For a visual element, ChatWaifu can integrate with Live2D for enhanced user interface experiences.
- GPT3 API with CUDA Acceleration: Developers can access a version that utilizes the official GPT3 API, optimized for CUDA acceleration.
Setting Up the Environment
To get started with ChatWaifu, it is recommended to use Chrome as the default browser. Here is a step-by-step guide:
Step 1: Install the Required Environment
Ensure that Anaconda is installed or that Python version 3.7 or higher is available. The environment name suggested here is "chatWaifu."
- Navigate to the Project Folder:
- Use the command
cd your_project_path
to enter the directory.
- Use the command
- Create a Python Virtual Environment:
- With Conda:
conda create --name chatWaifu python=3.10
- With Python:
python -m venv chatWaifu
- With Conda:
- Activate the Virtual Environment:
- With Conda:
conda activate chatWaifu
- With Python:
.\chatWaifu\Scripts\activate.bat
- With Conda:
- Install Necessary Libraries:
- Run
pip install -r requirements.txt
to install all required dependencies.
- Run
Step 2: Import the Models
Models must be placed in the root directory under the "model" folder. They can be downloaded from:
- Google Drive
- Aliyun Drive: Use the provided extraction code
m2y3
.
Move downloaded models to the project root directory and double-click to import them.
Step 3: Running the Program
Connect and converse with the waifus using various input methods:
- Text Input Version:
python ChatWaifu.py
- Voice Dialogue Version (Japanese and English input default to Japanese output):
python ChatWaifuVoice.py
For specific language interactions:
- Japanese Text:
python ChatWaifuJP.py
- Chinese Text:
python ChatWaifuCN.py
- Japanese Voice (using Chinese):
python ChatWaifuJPVoice.py
- Chinese Voice (using Chinese):
python ChatWaifuCNVoice.py
- Japanese Voice (using English):
python ChatWaifuJPVoiceEN.py
- Japanese Voice (using Japanese):
python ChatWaifuJPVoiceJP.py
Step 3.1: Obtaining ChatGPT Token
- Log in to https://chat.openai.com via a web browser.
- Press F12 to open the developer console.
- Navigate to Application -> Cookies -> __Secure-next-auth.session-token.
- Copy the value into the terminal and press enter.
Step 3.2: Starting Chat with CyberWaifu
For voice dialogue mode, start speaking when prompted "You:" in the console. Once finished, the recording will automatically send to ChatGPT for interaction.
Gratitude
Special thanks to:
The ChatWaifu project offers a cutting-edge, human-like conversation experience by integrating the latest in AI-driven dialogue systems with creative and customizable voice interactions.