bugfix
This commit is contained in:
parent
c008d8f0f0
commit
e30a53f13a
@ -219,7 +219,8 @@ class F5TTS:
|
||||
|
||||
def setup_voices(self):
|
||||
config = getConfig()
|
||||
workdir = get_serverenv('workdir')
|
||||
workdir = config.workdir
|
||||
print('workdir=', workdir)
|
||||
d = None
|
||||
with codecs.open(config.speakers_file, 'r', 'utf-8') as f:
|
||||
b = f.read()
|
||||
@ -251,7 +252,7 @@ class F5TTS:
|
||||
async def add_voice(self, speaker, ref_audio, ref_text):
|
||||
config = getConfig()
|
||||
ref_audio = FileStorage().realPath(ref_audio)
|
||||
workdir = get_serverenv('workdir')
|
||||
workdir = config.workdir
|
||||
filename = f'{getID()}.wav'
|
||||
fn = f'{workdir}/samples/{filename}'
|
||||
await awaitify(self.copyfile)(ref_audio, fn)
|
||||
@ -333,6 +334,7 @@ def init():
|
||||
global f5
|
||||
g = ServerEnv()
|
||||
f5 = F5TTS()
|
||||
g.tts_engine = f5
|
||||
g.infer_stream = f5.infer_stream
|
||||
g.inference_stream = f5.inference_stream
|
||||
g.get_speakers = f5.get_speakers
|
||||
|
@ -21,6 +21,7 @@
|
||||
"ref_audio":"ttt.wav",
|
||||
"ref_text":"快点吃饭,上课要迟到了。",
|
||||
"cross_fade_duration":0,
|
||||
"workdir":"$[workdir]$",
|
||||
"filesroot":"$[workdir]$/files",
|
||||
"logger":{
|
||||
"name":"f5tts",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"ymq": {
|
||||
"ref_text": "\u8f7b\u91cf\u5e94\u7528\u670d\u52a1\u5668\u5907\u6848\u6761\u4ef6\uff1a\u8d2d\u4e70\u65f6\u957f\u57283\u4e2a\u6708\u53ca\u4ee5\u4e0a",
|
||||
"ref_audio": "samples/ymq.wav"
|
||||
"ref_audio": "ymq.wav"
|
||||
}
|
||||
}
|
||||
|
@ -6,7 +6,8 @@ User=ymq
|
||||
Group=ymq
|
||||
WorkingDirectory=/share/ymq/run/f5tts
|
||||
Type=forking
|
||||
ExecStart=/share/ymq/run/f5tts/run.sh
|
||||
ExecStart=/share/ymq/run/f5tts/start.sh
|
||||
ExecStop=/share/ymq/run/f5tts/stop.sh
|
||||
StandardOutput=append:/var/log/f5tts/f5tts.log
|
||||
StandardError=append:/var/log/f5tts/f5tts.log
|
||||
SyslogIdentifier=f5tts
|
||||
|
@ -1,10 +1,11 @@
|
||||
numpy
|
||||
soundfile
|
||||
cached_path
|
||||
redis
|
||||
pycld2
|
||||
cn2an
|
||||
apppublic
|
||||
sqlor
|
||||
ahserver
|
||||
file2text
|
||||
git+https://git.kaiyuancloud.cn/yumoqing/apppublic
|
||||
git+https://git.kaiyuancloud.cn/yumoqing/sqlor
|
||||
git+https://git.kaiyuancloud.cn/yumoqing/ahserver
|
||||
git+https://git.kaiyuancloud.cn/yumoqing/filetxt
|
||||
# git+https://github.com/SWivid/F5-TTS
|
||||
|
5
run.sh
5
run.sh
@ -1,5 +0,0 @@
|
||||
echo start 3 instances for f5tts engine
|
||||
rundir=/share/ymq/run/f5tts
|
||||
CUDA_VISIBLE_DEVICES=4 ${rundir}/f5tts.env/bin/python ${rundir}/app/f5tts.py -w ${rundir} -p 9995 &
|
||||
CUDA_VISIBLE_DEVICES=4 ${rundir}/f5tts.env/bin/python ${rundir}/app/f5tts.py -w ${rundir} -p 9995 &
|
||||
|
10
start.sh
Executable file
10
start.sh
Executable file
@ -0,0 +1,10 @@
|
||||
#!/usr/bin/bash
|
||||
|
||||
echo start 3 instances for f5tts engine
|
||||
rundir=/share/ymq/run/f5tts
|
||||
CUDA_VISIBLE_DEVICES=6 ${rundir}/f5tts.env/bin/python ${rundir}/app/f5tts.py -w ${rundir} -p 9995 &
|
||||
CUDA_VISIBLE_DEVICES=6 ${rundir}/f5tts.env/bin/python ${rundir}/app/f5tts.py -w ${rundir} -p 9995 &
|
||||
CUDA_VISIBLE_DEVICES=6 ${rundir}/f5tts.env/bin/python ${rundir}/app/f5tts.py -w ${rundir} -p 9995 &
|
||||
CUDA_VISIBLE_DEVICES=6 ${rundir}/f5tts.env/bin/python ${rundir}/app/f5tts.py -w ${rundir} -p 9995 &
|
||||
|
||||
exit 0
|
Loading…
Reference in New Issue
Block a user