From 98f9a7975851e6c6409bc98ad5aa249910f9be21 Mon Sep 17 00:00:00 2001 From: sudoskys Date: Wed, 15 Nov 2023 01:12:48 +0800 Subject: [PATCH] feat(init):project --- README.md | 39 ++++++++++++++++++++++++++++++++++----- 1 file changed, 34 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index b7e88a2..2e6f425 100644 --- a/README.md +++ b/README.md @@ -2,20 +2,49 @@ -

llmbot-plugin-bilisearch

+

llmbot_plugin_reecho_voice

-适用于 [OpenaiBot](https://github.com/LlmKira/Openaibot) 的函数插件,可以通过自然语言调用哔哩哔哩搜索功能。 +适用于 [OpenaiBot](https://github.com/LlmKira/Openaibot) 的函数插件,可以提供中文语音合成功能。 ## 📦 Install ```shell -pip install llmbot_plugin_bilisearch -U +pip install llmbot_plugin_reecho_voice -U ``` -https://github.com/LlmKira/llmbot_plugin_bilisearch/blob/main/llmbot_plugin_bilisearch/__init__.py#L2-L8 +## 📄 Usage +`/env REECHO_MODEL=xxx;REECHO_KEY=xxx;REECHO_VOICE_ID=xxx` + +模型 ID 可以在 [ReEcho](https://dash.reecho.ai/voices) 的控制台中找到。注意需要完整的模型 +ID,例如 `9ede7186-f24b-4018-a907-c3927c5e596a`。 + +### 公共 API Key + +可以额外配置 `PLUGIN_REECHO_KEY` 来指定默认公共 API Key。 + +默认参数如下 + +```python +voice_id = "e91ee8b1-11ac-4e5e-b381-5978e184f055" +model = "reecho-neural-voice-001" +``` + +也就是 https://dash.reecho.ai/voice/e91ee8b1-11ac-4e5e-b381-5978e184f055 ## 📝 Hook -https://github.com/LlmKira/llmbot_plugin_bilisearch/blob/cbe0e4b20320b8789a5dad44eefef3c0c8233484/llmbot_plugin_bilisearch/__init__.py#L63-L71 +```python +class ReechoSpeak(BaseTool): + """ + 语音工具 + """ + silent: bool = False + function: Function = speak_chinese + keywords: list = ["语音", "说", "读", "念", "回答", "骂", "唱", "朗读", "朗诵"] + require_auth: bool = False + repeatable: bool = False + env_required: list = ["KEY", "VOICE_ID", "MODEL"] + env_prefix: str = "REECHO_" +``` \ No newline at end of file