diff --git a/README.md b/README.md index 2c9d519..be9d516 100644 --- a/README.md +++ b/README.md @@ -247,6 +247,7 @@ docker build -t xiaomusic . - XIAOMUSIC_PUBLIC_PORT 用于设置外网端口,对应后台的 【外网访问端口】,当使用反向代理时可以设置为外网端口,XIAOMUSIC_HOSTNAME 设为外网IP或者域名即可。 - XIAOMUSIC_DOWNLOAD_PATH 变量可以配置下载目录,默认为空,表示使用 music 目录为下载目录,对应后台的 【音乐下载目录】。设置这个目录必须是 music 的子目录,否则刷新列表后会找不到歌曲。具体见 - XIAOMUSIC_PROXY 用于配置国内使用 youtube 源下载歌曲时使用的代理,参数格式参考 yt-dlp 文档说明。 见 +- MIIO_TTS_CMD 用于部分机型(如:`L05C`)使用 MiIO 支持 tts 能力,默认为空,命令选择见 [MiService-fork 文档](https://github.com/yihong0618/MiService) ### :warning: 安全提醒 diff --git a/config-example.json b/config-example.json index b24b940..199ca4d 100644 --- a/config-example.json +++ b/config-example.json @@ -2,6 +2,7 @@ "account": "", "password": "", "mi_did": "", + "miio_tts_command": null, "cookie": "", "verbose": false, "music_path": "music", diff --git a/xiaomusic/config.py b/xiaomusic/config.py index 3ee20e1..60a6eec 100644 --- a/xiaomusic/config.py +++ b/xiaomusic/config.py @@ -77,6 +77,7 @@ class Config: account: str = os.getenv("MI_USER", "") password: str = os.getenv("MI_PASS", "") mi_did: str = os.getenv("MI_DID", "") # 逗号分割支持多设备 + miio_tts_command: str = os.getenv("MIIO_TTS_CMD", "") cookie: str = "" verbose: bool = os.getenv("XIAOMUSIC_VERBOSE", "").lower() == "true" music_path: str = os.getenv( diff --git a/xiaomusic/static/default/setting.html b/xiaomusic/static/default/setting.html index fc7ed7b..5fd5c71 100644 --- a/xiaomusic/static/default/setting.html +++ b/xiaomusic/static/default/setting.html @@ -110,6 +110,9 @@ var vConsole = new window.VConsole(); + + +