mirror of
https://github.com/zhayujie/chatgpt-on-wechat.git
synced 2026-06-02 00:57:41 +08:00
[voice] add google voice support
This commit is contained in:
17
voice/voice_factory.py
Normal file
17
voice/voice_factory.py
Normal file
@@ -0,0 +1,17 @@
|
||||
"""
|
||||
voice factory
|
||||
"""
|
||||
|
||||
def create_voice(voice_type):
|
||||
"""
|
||||
create a voice instance
|
||||
:param voice_type: voice type code
|
||||
:return: voice instance
|
||||
"""
|
||||
if voice_type == 'xfyun':
|
||||
from voice.xfyun.xfyun_voice import XfyunVoice
|
||||
return XfyunVoice()
|
||||
elif voice_type == 'google':
|
||||
from voice.google.google_voice import GoogleVoice
|
||||
return GoogleVoice()
|
||||
raise RuntimeError
|
||||
Reference in New Issue
Block a user