AI Personal Learning
and practical guidance
豆包Marscode1

VirtualWife: A secondary digital person that supports B-station live streaming and voice interaction

General Introduction

VirtualWife is an open source virtual digital person project created by developer yakami129. It is currently in the incubation stage, the goal is to create a virtual character with a "soul", users can interact with it like a friend. The project supports B-station live streaming and can communicate with users through Chinese voice and text. It combines OpenAI and Ollama VirtualWife uses Docker for one-click deployment and supports Linux, Windows and MacOS systems. The developers hope that it can be used as a relationship coach or counselor in the future, integrating into human life and solving emotional needs.

VirtualWife:支持B站直播和语音互动的二次元数字人-1


 

Function List

  • Supports real-time live streaming on B station, which allows you to interact with the audience.
  • Conversation via Chinese voice with fast response time and streaming support.
  • Provides short-term and long-term memory functions that can memorize user conversations.
  • Supports customizable character settings with user adjustable personalities and backgrounds.
  • Replacement VRM models are supported and roles can be downloaded from https://hub.vroid.com/.
  • Integration of multiple large language models (e.g., OpenAI, Ollama), support for switching and private deployment.
  • Text-driven expressions and actions to enhance interactive realism.
  • Supports Edge (Microsoft) and Bert-VITS2 voice switching for more natural Chinese pronunciation.

 

Using Help

Installation process

VirtualWife is deployed via Docker and is suitable for tech enthusiasts and casual users. Here are the detailed steps:

  1. Installing Docker
    • Windows/MacOS: Download Docker Desktop, install it and launch it.
    • Linux: Open a terminal and enter the following command to install Docker and Docker Compose:
      sudo apt update && sudo apt install docker.io docker-compose -y
      
    • Check for success: run docker -v cap (a poem) docker-compose -vIf you see the version number, you are done.
  2. Access to project documents
    • Go to https://github.com/yakami129/VirtualWife, click the "Code" button, and select "Download ZIP" to download. Or use Git:
      git clone https://github.com/yakami129/VirtualWife.git
      
    • Unzip and go to VirtualWife Folder.
  3. Configuring Environment Variables
    • locate env_example file, rename it to .envThe
    • Open with a text editor .env, fill in the necessary parameters. For example:
      TIMEZONE=Asia/Shanghai
      OPENAI_API_KEY=your-api-key-here
      
    • If using Ollama, add OLLAMA_API_URL=http://host.docker.internal:11434The
  4. triggering program
    • go into installer folder, run:
      cd installer
      docker-compose up -d
      
    • The initial startup will download the image and may take 5-10 minutes. Once complete, use the docker ps Check the container status.
  5. access page
    • Open your browser and type http://localhost/, enter the configuration screen.

Initialization Configuration

1. Basic configuration

  • Once on the webpage, select the character model (downloaded from the VRM Marketplace) and upload it.
  • Choose a language model: OpenAI or Ollama.
  • Click Save to use it without rebooting.

2. Language modeling

  • OpenAI: Fill in OPENAI_API_KEYOptional Proxy Address OPENAI_BASE_URLThe
  • Ollama: If you are deploying with Docker, set it to http://host.docker.internal:11434The
  • Save the configuration and then you can talk.

3. Advanced settings

  • If the network is limited, configure a proxy, such as HTTP_PROXY=http://host.docker.internal:23457The
  • Save when adjustments are complete.

Using the main functions

1. B-station live streaming

  • intend: in .env Fill in the B Live room number and authentication information (see FAQ).
  • manipulate::
    1. After starting the project, VirtualWife automatically connects to the B station.
    2. Viewers send pop-ups, and VirtualWife responds with real-time voice replies.
    3. Direct conversation via microphone is available for enhanced interaction.
  • take note of: Due to the adjustment of B station interface, the prompt to enter the room is not available at the moment.

2. Voice dialogues

  • manipulate::
    1. Connect a microphone and speak into it, such as "How was your day?" .
    2. VirtualWife will answer in Chinese voice.
  • Toggle Voice: Select Edge or Bert-VITS2 in the configuration, Bert-VITS2 is more suitable for Chinese.
  • suggestion: Keep the environment quiet and avoid distracting noises.

3. Customized roles

  • Replacement model::
    1. Download the VRM file from https://hub.vroid.com/.
    2. put into installer/linux maybe installer/windows Folder.
    3. Restart the project and the new model takes effect.
  • Adjustment of personality: Modify the role settings on the configuration page, such as "Gentle" or "Lively".

4. Memory functions

  • VirtualWife remembers conversations. For example, if you say, "I like dogs," the next time it might ask, "How's your dog?" Next time it might ask "How's your dog?".
  • Current memories cannot be viewed manually, but will be reflected in conversations.

Frequently Asked Questions

  • fail to activate: Check if Docker is running and port 23457 is occupied.
  • Voice unresponsive: To confirm that the microphone is working, switch Bert-VITS2 and try it.
  • B station connection failure:: Reconciliation .env The live configuration in the

 

application scenario

  1. emotional companionship
    Users can chat with VirtualWife when they feel lonely. It remembers your preferences and provides warm companionship.
  2. live interaction
    B station anchors use it to add interest to their live broadcasts, reply to pop-ups, and boost audience engagement.
  3. role-playing (as a game of chess)
    Users can customize their characters, such as "Catwoman" or "Arrogant Girl", to experience immersive interactions.
  4. Technology Exploration
    Developers can study the source code and learn about virtual digital people and AI technology.

 

QA

  1. Does VirtualWife charge a fee?
    It is a free and open source project, but there are API costs associated with using OpenAI models.
  2. Does it support cell phone operation?
    Currently not supported, need to be deployed with Docker on a PC.
  3. How can we improve the quality of the dialog?
    Switch to a stronger model in the configuration, such as OpenAI GPT-4.
  4. Support for English conversation?
    English can be input, but the voice output is mainly in Chinese.
May not be reproduced without permission:Chief AI Sharing Circle " VirtualWife: A secondary digital person that supports B-station live streaming and voice interaction
en_USEnglish