This commit is contained in:
恍兮惚兮 2024-03-24 20:57:34 +08:00
parent eb9849391c
commit 32db3e2433
4 changed files with 0 additions and 50 deletions

View File

@ -1,28 +0,0 @@
from traceback import print_exc
import requests ,os
from myutils.config import globalconfig
from translator.basetranslator import basetrans
import json
from myutils.subproc import subproc_w,autoproc
class TS(basetrans):
def inittranslator(self):
path=self.config['路径']
if path=="":
return False
if os.path.exists(path)==False:
return False
yakupath=os.path.join(path,'YakuYaku/server.py')
yakupathd=os.path.join(path,'YakuYaku')
pypath=os.path.join(path,'python-3.11.5-embed-amd64/python.exe')
if os.path.exists(pypath)==False:
return False
self.engine=autoproc(subproc_w('"{}" "{}"'.format(pypath,yakupath),cwd=yakupathd,name='yakuyaku'))
def translate(self,query):
res=requests.get('http://127.0.0.1:1998/',params={'text':query,'t2s':'t2s' if self.tgtlang=='zh' else ''}).text
return res

View File

@ -942,12 +942,6 @@
"color": "#1839f0",
"name": "Sugoi"
},
"yakuyaku": {
"type": "offline",
"use": false,
"color": "#1839f0",
"name": "YakuYaku"
},
"kingsoft": {
"type": "offline",
"use": false,

View File

@ -29,10 +29,6 @@
"name": "金山快译",
"link": "https://github.com/HIllya51/RESOURCES/releases/download/offline_translator/FastAIT09_Setup.25269.4101.zip"
},
{
"name": "YakuYaku",
"link": "https://github.com/HIllya51/RESOURCES/releases/download/offline_translator/YakuYaku.zip"
},
{
"name": "快译通",
"link": "https://github.com/HIllya51/RESOURCES/releases/download/offline_translator/DR.eye.zip"

View File

@ -159,18 +159,6 @@
}
}
},
"yakuyaku": {
"args": {
"路径": ""
}
,
"argstype":{
"路径":{
"type":"file",
"dir":true
}
}
},
"huoshanapi": {
"args": {
"注册网址": "https://www.volcengine.com/docs/4640/130872",