From ce505251f8c1281dfc7c557034131751443bc57b Mon Sep 17 00:00:00 2001 From: gaojia Date: Wed, 26 Mar 2025 10:01:41 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=85=8D=E7=BD=AE=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E5=8F=8A=E6=96=87=E4=BB=B6=E5=A4=B9=E5=90=8D=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- voice/factory.py | 6 +++++- voice/telent/config.json.template | 5 ----- voice/tencent/config.json.template | 5 +++++ voice/{telent => tencent}/tencent_voice.py | 0 4 files changed, 10 insertions(+), 6 deletions(-) delete mode 100644 voice/telent/config.json.template create mode 100644 voice/tencent/config.json.template rename voice/{telent => tencent}/tencent_voice.py (100%) diff --git a/voice/factory.py b/voice/factory.py index 2269d9e1..e707c637 100644 --- a/voice/factory.py +++ b/voice/factory.py @@ -51,7 +51,11 @@ def create_voice(voice_type): return XunfeiVoice() elif voice_type == "tencent": - from voice.telent.tencent_voice import TencentVoice + from voice.tencent.tencent_voice import TencentVoice return TencentVoice() + elif voice_type == "funasr": + from voice.funasr.fun_voice import FunVoice + + return FunVoice() raise RuntimeError diff --git a/voice/telent/config.json.template b/voice/telent/config.json.template deleted file mode 100644 index 0e5526a0..00000000 --- a/voice/telent/config.json.template +++ /dev/null @@ -1,5 +0,0 @@ -{ - "voice_type": 1003, # 客服女声 - "tencent_secret_id": "YOUR_SECRET_ID", - "tencent_secret_key": "YOUR_SECRET_KEY" -} diff --git a/voice/tencent/config.json.template b/voice/tencent/config.json.template new file mode 100644 index 00000000..91a035cb --- /dev/null +++ b/voice/tencent/config.json.template @@ -0,0 +1,5 @@ +{ + "voice_type": 1003, # 客服女声 + "secret_id": "YOUR_SECRET_ID", + "secret_key": "YOUR_SECRET_KEY" +} diff --git a/voice/telent/tencent_voice.py b/voice/tencent/tencent_voice.py similarity index 100% rename from voice/telent/tencent_voice.py rename to voice/tencent/tencent_voice.py