Files
TheVirtualOne/README.md

71 lines
1.7 KiB
Markdown

# The Virtual One
TheVirtualOne, 打造你的专属话痨
# Install/安装
开发时使用python版本为3.10.19
## clone/拉取仓库
选取一种方法拉取完整仓库
1. 直接拉取
```bash
git clone 仓库.git --recurse-submodules
cd 仓库
```
2. 手动拉取必要内容
```bash
git clone 仓库.git
cd 仓库
git clone -b main https://github.com/NINEMINEsigma/Convention-Python.git Convention # 或者使用仓库http://gitea.liubai.site/ninemine/Convention-Python.git
```
## requirements/依赖
安装python依赖
```bash
pip install -r requirements.txt
```
**Ollama** 准备好你要使用的ollama base url
**可选的语音合成** 如果你将使用tts那么需要准备CosyVocie2-0.5B
## config/配置
运行cli.py或web_server.py自动生成Assets/Config.json或手动生成
```java
{
"properties": {
"ollama_url": "http://localhost:11434",
"ollama_model": "gemma3:4b",
"server_port": 11451,
"server_host": "0.0.0.0",
"response_timeout": 300,
"tts_host": "localhost",
"tts_port": 43400,
"tts_prompt_wav_path": "StreamingAssets/tts prompt.mp3",
"tts_prompt_text": "tts prompt text",
"tts_speaker_id": "speaker",
"tts_timeout": 180,
"sentence_max_length": 100,
"tts_enabled": true,//可选
"system_prompt_path": "Assets/prompt.txt",
"stream_enable": false,//web_server.py不要开启
"auto_speak_wait_second": 45.0,
"tts_server_url": "http://localhost:43400"
}
}
```
# start/开始
如需要tts服务, 需要
```bash
python tts_server.py
```
后可启动服务
```bash
python cli.py #或web_server.py
```
# 项目引用代码
[FunAudioLLM/CosyVoice](https://github.com/FunAudioLLM/CosyVoice)