summaryrefslogtreecommitdiff
path: root/INSTALL.md
blob: 5981fcee6e1f968fecbecfcd323737a9bfe2a370 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# MiMo V2.5 TTS — 安装说明(给 Agent 看)

> **提示**:如果你已经安装过其他 MiMo 插件(如 mimo-asr、mimo-websearch)并已配置过 `XIAOMI_API_KEY` 和 `XIAOMI_BASE_URL`,可以直接复用已有的环境变量配置,无需重复询问 API Key 和端点。

## 前置条件

- Hermes Agent 已安装并可运行
- Xiaomi MiMo API Key(获取地址:https://mimo.mi.com)

## 安装

> **注意**:`setup.sh` 仅供参考,请勿直接运行。请阅读以下步骤,根据用户的环境自行完成安装。
> 以下命令中的 `~/.hermes` 仅为 Unix 典型路径,**不要硬编码**。安装前请先确认 Hermes 的实际安装目录(如 `$HERMES_HOME`、`$env:HERMES_HOME` 等)。

将插件文件复制到 Hermes 插件目录并启用:

```bash
mkdir -p ~/.hermes/plugins/tts/mimo
cp plugin.yaml __init__.py ~/.hermes/plugins/tts/mimo/
hermes plugins enable tts/mimo
```

```powershell
# Windows (PowerShell)
mkdir -Force "$env:USERPROFILE\.hermes\plugins\tts\mimo"
cp plugin.yaml,__init__.py "$env:USERPROFILE\.hermes\plugins\tts\mimo\"
hermes plugins enable tts/mimo
```

安装后手动配置:

```bash
hermes config set tts.provider mimo
hermes config set tts.voice Mia       # 可选,不设则用 mimo_default
# 重启 session 生效(/reset)
```

如果希望安装独立命令行脚本:

```bash
cp mimo_tts.py ~/mimo_tts.py
chmod +x ~/mimo_tts.py
```

```powershell
# Windows (PowerShell)
cp mimo_tts.py "$env:USERPROFILE\mimo_tts.py"
```

## 环境变量

| 变量 | 必需 | 说明 |
|------|------|------|
| `XIAOMI_API_KEY` | ✅ | MiMo API Key |
| `XIAOMI_BASE_URL` | 可选 | API 端点(默认 `https://api.xiaomimimo.com/v1`,国内用户可能需要设为 `https://token-plan-cn.xiaomimimo.com/v1`) |

配置在 Hermes 的 `.env` 文件中。

## 卸载

```bash
hermes plugins disable tts/mimo
rm -rf ~/.hermes/plugins/tts/mimo
rm -f ~/mimo_tts.py
```

```powershell
# Windows (PowerShell)
hermes plugins disable tts/mimo
rm -Recurse -Force "$env:USERPROFILE\.hermes\plugins\tts\mimo"
rm -Force "$env:USERPROFILE\mimo_tts.py"
```