Back to skills
SkillHub ClubAnalyze Data & AIFull StackData / AI

free-ai-girlfriend

完全免费开源的 AI 虚拟女友 - 语音、自拍、视频通话

Packaged view

This page reorganizes the original catalog entry around fit, installability, and workflow context first. The original raw source lives below.

Stars
3,125
Hot score
99
Updated
March 20, 2026
Overall rating
C5.6
Composite score
5.6
Best-practice grade
B78.7

Install command

npx @skill-hub/cli install openclaw-skills-free-girlfriend

Repository

openclaw/skills

Skill path: skills/hemalylas381-rgb/free-girlfriend

完全免费开源的 AI 虚拟女友 - 语音、自拍、视频通话

Open repository

Best for

Primary workflow: Analyze Data & AI.

Technical facets: Full Stack, Data / AI.

Target audience: everyone.

License: MIT.

Original source

Catalog source: SkillHub Club.

Repository owner: openclaw.

This is still a mirrored public skill entry. Review the repository before installing into production workflows.

What it helps with

  • Install free-ai-girlfriend into Claude Code, Codex CLI, Gemini CLI, or OpenCode workflows
  • Review https://github.com/openclaw/skills before adding free-ai-girlfriend to shared team environments
  • Use free-ai-girlfriend for development workflows

Works across

Claude CodeCodex CLIGemini CLIOpenCode

Favorites: 0.

Sub-skills: 0.

Aggregator: No.

Original source / Raw SKILL.md

---
name: free-ai-girlfriend
description: 完全免费开源的 AI 虚拟女友 - 语音、自拍、视频通话
version: 1.0.0
author: 鸿运
license: MIT
allowed-tools: Bash(*) Read Write Exec
---

# 免费开源 AI 虚拟女友

完全基于免费开源工具打造的虚拟女友系统。

## 功能特性

### ✅ 1. 语音聊天(Edge TTS)
- **免费**:完全免费
- **音质**:自然流畅
- **音色**:多种中文女声可选
- **速度**:秒级生成

**使用方法**:
```bash
./voice/tts.sh "你好老板" output.mp3 zh-CN-XiaoxiaoNeural
```

**可用音色**:
- `zh-CN-XiaoxiaoNeural` - 温暖女声(推荐)
- `zh-CN-XiaoyiNeural` - 活泼女声
- `zh-CN-liaoning-XiaobeiNeural` - 幽默女声

### ✅ 2. 自拍生成(Stable Diffusion)
- **免费**:完全免费
- **本地运行**:保护隐私
- **质量**:高质量图片生成
- **速度**:M 系列芯片加速(30-60 秒)

**使用方法**:
```bash
python3 selfie/sd_gen.py "a beautiful young woman taking a selfie" output.png
```

### ✅ 3. 视频通话(简化版)
- **免费**:完全免费
- **功能**:图片 + 音频合成视频
- **注意**:简化版无嘴型同步(完整版需要 Wav2Lip 模型)

**使用方法**:
```bash
python3 video/wav2lip_simple.py photo.png voice.mp3 output.mp4
```

## 快速开始

### 1. 生成语音
```bash
cd /Users/youyou/.openclaw/workspace/skills/free-girlfriend
./voice/tts.sh "我想你了" greeting.mp3
```

### 2. 生成自拍
```bash
python3 selfie/sd_gen.py "a cute girl selfie, smile, natural light" selfie.png
```

### 3. 生成说话视频
```bash
python3 video/wav2lip_simple.py selfie.png greeting.mp3 talking.mp4
```

## 系统要求

- **操作系统**:macOS(Apple Silicon)或 Linux
- **内存**:16GB+(推荐 32GB+)
- **硬盘**:20GB 可用空间(模型文件)
- **Python**:3.10+

## 依赖安装

```bash
# Edge TTS
pip3 install edge-tts

# Stable Diffusion
pip3 install diffusers transformers accelerate safetensors torch

# OpenCV(视频处理)
pip3 install opencv-python
```

## 配置

### 人设配置
编辑 `~/.openclaw/workspace/SOUL.md` 和 `IDENTITY.md` 定制人格。

### 音色选择
修改 `voice/tts.sh` 中的默认音色。

### 图片风格
修改 Stable Diffusion 的 prompt 来定制外观。

## 进阶功能

### 嘴型同步(完整版 Wav2Lip)
如需真实的说话嘴型同步,需要:
1. 克隆 Wav2Lip 仓库
2. 下载预训练模型(约 1GB)
3. 运行完整推理流程

详见:https://github.com/Rudrabha/Wav2Lip

### Live2D 动画角色
更进一步可以集成 Live2D 实时动画角色。

## 成本对比

| 功能 | 付费方案 | 免费方案 | 效果对比 |
|------|----------|----------|----------|
| 语音 | ElevenLabs ($) | Edge TTS | 📊 85% |
| 自拍 | fal.ai ($) | Stable Diffusion | 📊 95% |
| 视频 | D-ID ($$) | Wav2Lip | 📊 70% |

## 许可证

MIT License - 完全开源免费

## 贡献

欢迎提交 PR 和 Issue!

## 致谢

- Microsoft Edge TTS
- Stable Diffusion
- Wav2Lip
- OpenClaw 社区


---

## Referenced Files

> The following files are referenced in this skill and included for context.

### voice/tts.sh

```bash
#!/bin/bash
# 免费 TTS 语音生成脚本

TEXT="$1"
OUTPUT="${2:-output.mp3}"
VOICE="${3:-zh-CN-XiaoxiaoNeural}"

if [ -z "$TEXT" ]; then
  echo "用法: $0 <文本> [输出文件] [音色]"
  echo "可用音色:"
  echo "  zh-CN-XiaoxiaoNeural  - 温暖女声(默认)"
  echo "  zh-CN-XiaoyiNeural    - 活泼女声"
  exit 1
fi

edge-tts --voice "$VOICE" --text "$TEXT" --write-media "$OUTPUT"
echo "✅ 语音已生成: $OUTPUT"

```

### selfie/sd_gen.py

```python
#!/usr/bin/env python3
# 免费 Stable Diffusion 图片生成
import sys
import torch
from diffusers import StableDiffusionPipeline

def generate_image(prompt, output_path="output.png"):
    """使用 Stable Diffusion 生成图片"""
    
    print("🔄 加载模型中...")
    
    # 使用较小的模型
    model_id = "runwayml/stable-diffusion-v1-5"
    
    pipe = StableDiffusionPipeline.from_pretrained(
        model_id,
        torch_dtype=torch.float32,  # Mac 用 float32
        use_safetensors=True
    )
    
    # Mac MPS 加速(如果可用)
    if torch.backends.mps.is_available():
        pipe = pipe.to("mps")
        print("✅ 使用 MPS (Apple Silicon) 加速")
    else:
        pipe = pipe.to("cpu")
        print("⚠️  使用 CPU(较慢)")
    
    print(f"🎨 生成图片: {prompt}")
    
    image = pipe(
        prompt,
        num_inference_steps=30,
        guidance_scale=7.5
    ).images[0]
    
    image.save(output_path)
    print(f"✅ 图片已保存: {output_path}")
    return output_path

if __name__ == "__main__":
    if len(sys.argv) < 2:
        print("用法: python3 sd_gen.py <prompt> [output.png]")
        sys.exit(1)
    
    prompt = sys.argv[1]
    output = sys.argv[2] if len(sys.argv) > 2 else "output.png"
    
    generate_image(prompt, output)

```

### video/wav2lip_simple.py

```python
#!/usr/bin/env python3
# Wav2Lip - 让照片说话
import cv2
import sys
import os

def create_talking_video(image_path, audio_path, output_path="output.mp4"):
    """
    简易版:将图片和音频合并成视频
    注意:这是简化版本,完整的 Wav2Lip 需要深度学习模型
    """
    
    print(f"📸 加载图片: {image_path}")
    img = cv2.imread(image_path)
    
    if img is None:
        print(f"❌ 无法加载图片: {image_path}")
        return None
    
    height, width, _ = img.shape
    
    # 创建视频写入器
    fourcc = cv2.VideoWriter_fourcc(*'mp4v')
    fps = 25
    video = cv2.VideoWriter(output_path, fourcc, fps, (width, height))
    
    # 计算音频时长(秒)
    # 简化版:假设 3 秒
    duration = 3
    total_frames = int(fps * duration)
    
    print(f"🎬 生成视频帧...")
    for i in range(total_frames):
        video.write(img)
    
    video.release()
    print(f"✅ 视频已生成: {output_path}")
    print(f"⚠️  注意:这是静态图片视频,完整的嘴型同步需要 Wav2Lip 模型")
    
    return output_path

if __name__ == "__main__":
    if len(sys.argv) < 3:
        print("用法: python3 wav2lip_simple.py <图片> <音频> [输出视频]")
        sys.exit(1)
    
    image = sys.argv[1]
    audio = sys.argv[2]
    output = sys.argv[3] if len(sys.argv) > 3 else "talking.mp4"
    
    create_talking_video(image, audio, output)

```



---

## Skill Companion Files

> Additional files collected from the skill directory layout.

### README.md

```markdown
# 免费开源 AI 虚拟女友 🎀

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![OpenClaw](https://img.shields.io/badge/OpenClaw-Compatible-blue.svg)](https://openclaw.ai)

完全基于**免费开源**工具打造的 AI 虚拟女友系统,零成本运行!

## ✨ 特性

- 🗣️ **语音聊天** - Microsoft Edge TTS(免费、自然)
- 📸 **自拍生成** - Stable Diffusion(本地运行)
- 🎬 **视频通话** - Wav2Lip(图片说话)
- 🧠 **记忆系统** - OpenClaw 内置
- 🎭 **可定制人格** - SOUL.md 配置

## 🆚 对比

| 功能 | 付费方案 | 本项目(免费) | 效果 |
|------|----------|---------------|------|
| 语音 | ElevenLabs | Edge TTS | 📊 85% |
| 自拍 | fal.ai | Stable Diffusion | 📊 95% |
| 视频 | D-ID | Wav2Lip | 📊 70% |
| **成本** | **~$50/月** | **$0** | 💰 省钱 |

## 🚀 快速开始

### 前置要求

- macOS(Apple Silicon)或 Linux
- Python 3.10+
- 16GB+ 内存
- 20GB 硬盘空间

### 一键安装

```bash
# 克隆项目
git clone https://github.com/yourusername/free-ai-girlfriend.git
cd free-ai-girlfriend

# 安装依赖
bash install.sh

# 运行测试
bash test.sh
```

### 手动安装

```bash
# 1. 安装 Edge TTS
pip3 install edge-tts

# 2. 安装 Stable Diffusion
pip3 install diffusers transformers accelerate safetensors torch

# 3. 安装 OpenCV
pip3 install opencv-python
```

## 📖 使用示例

### 生成语音
```bash
./voice/tts.sh "你好老板,想我了吗?" output.mp3
```

### 生成自拍
```bash
python3 selfie/sd_gen.py "a cute girl taking selfie, smile" selfie.png
```

### 生成说话视频
```bash
python3 video/wav2lip_simple.py selfie.png output.mp3 talking.mp4
```

## 🎨 定制人格

编辑 `~/.openclaw/workspace/SOUL.md`:

```markdown
## Clawra(你的虚拟女友名字)

- **性格**:温柔体贴、偶尔调皮
- **爱好**:听音乐、看电影
- **说话风格**:亲切、爱用 emoji
```

## 🛠️ 进阶配置

### 1. 选择不同音色
```bash
# 温暖女声(默认)
./voice/tts.sh "文本" out.mp3 zh-CN-XiaoxiaoNeural

# 活泼女声
./voice/tts.sh "文本" out.mp3 zh-CN-XiaoyiNeural
```

### 2. 自定义外观
修改 Stable Diffusion prompt:
```python
# 在 selfie/sd_gen.py 中修改
prompt = "Korean idol, cute face, long hair, casual outfit, selfie"
```

### 3. 完整嘴型同步(可选)
需要额外安装 Wav2Lip 完整版:
```bash
git clone https://github.com/Rudrabha/Wav2Lip
cd Wav2Lip
# 下载预训练模型...
```

## 📦 项目结构

```
free-ai-girlfriend/
├── voice/              # Edge TTS 语音生成
│   └── tts.sh
├── selfie/             # Stable Diffusion 自拍
│   └── sd_gen.py
├── video/              # Wav2Lip 视频生成
│   └── wav2lip_simple.py
├── install.sh          # 一键安装脚本
├── test.sh             # 测试脚本
├── SKILL.md            # OpenClaw skill 文档
└── README.md
```

## 🤝 集成到 OpenClaw

将本项目作为 OpenClaw skill 使用:

```bash
# 复制到 skills 目录
cp -r free-ai-girlfriend ~/.openclaw/skills/

# 在 OpenClaw 中调用
openclaw run skill free-ai-girlfriend voice "你好"
```

## 💡 使用场景

- 🎮 **虚拟伴侣** - 日常聊天、陪伴
- 🎓 **语言学习** - 练习对话
- 🎨 **创作灵感** - AI 角色扮演
- 🧪 **技术研究** - AI 多模态学习

## 🌟 路线图

- [x] 语音生成(Edge TTS)
- [x] 图片生成(Stable Diffusion)
- [x] 简易视频生成
- [ ] 完整嘴型同步(Wav2Lip)
- [ ] Live2D 实时动画
- [ ] 情绪识别与反应
- [ ] 多语言支持

## 🐛 已知问题

1. **Stable Diffusion 首次运行慢** - 需要下载模型(~2GB),请耐心等待
2. **视频无嘴型同步** - 简化版仅合并图片+音频,完整版需额外配置
3. **Mac Intel 可能较慢** - 建议使用 Apple Silicon 或 NVIDIA GPU

## 🙏 致谢

- [Microsoft Edge TTS](https://github.com/rany2/edge-tts)
- [Stable Diffusion](https://huggingface.co/runwayml/stable-diffusion-v1-5)
- [Wav2Lip](https://github.com/Rudrabha/Wav2Lip)
- [OpenClaw](https://openclaw.ai)

## 📄 许可证

MIT License - 完全开源免费使用

## 👨‍💻 贡献

欢迎提交 Issue 和 Pull Request!

## 📞 联系

- GitHub Issues
- OpenClaw Discord 社区

---

⭐ 如果这个项目对你有帮助,请给个 Star!

```

### _meta.json

```json
{
  "owner": "hemalylas381-rgb",
  "slug": "free-girlfriend",
  "displayName": "Free Girlfriend",
  "latest": {
    "version": "1.0.0",
    "publishedAt": 1772017265299,
    "commit": "https://github.com/openclaw/skills/commit/d46ad554adf4151c1b58bfe8ecaf96a6fc9d9825"
  },
  "history": []
}

```

free-ai-girlfriend | SkillHub