mirror of
https://github.com/zhayujie/chatgpt-on-wechat.git
synced 2026-07-20 05:27:59 +08:00
feat: add baidu translate api
This commit is contained in:
6
translate/factory.py
Normal file
6
translate/factory.py
Normal file
@@ -0,0 +1,6 @@
|
||||
def create_translator(voice_type):
|
||||
if voice_type == "baidu":
|
||||
from translate.baidu.baidu_translate import BaiduTranslator
|
||||
|
||||
return BaiduTranslator()
|
||||
raise RuntimeError
|
||||
Reference in New Issue
Block a user