[voice] add support for wispper

This commit is contained in:
wanggang
2023-03-08 11:02:01 +08:00
parent 720ad07f83
commit 882e6c3576
7 changed files with 60 additions and 42 deletions

View File

@@ -8,10 +8,13 @@ def create_voice(voice_type):
:param voice_type: voice type code
:return: voice instance
"""
if voice_type == 'xfyun':
from voice.xfyun.xfyun_voice import XfyunVoice
return XfyunVoice()
if voice_type == 'baidu':
from voice.baidu.baidu_voice import BaiduVoice
return BaiduVoice()
elif voice_type == 'google':
from voice.google.google_voice import GoogleVoice
return GoogleVoice()
elif voice_type == 'openai':
from voice.openai.openai_voice import OpenaiVoice
return OpenaiVoice()
raise RuntimeError