@@ -105,7 +105,7 @@ def voice_clone_main(net, prompt_text, prompt_audio, lang):
105
105
textInputPaths .append (os .path .join (inputDir , f'text/{ i } /index.txt' ))
106
106
audioOutPaths .append (path )
107
107
for i in range (1 , 4 ):
108
- path = os .path .join (outputDir , f'audio /{ i } ' )
108
+ path = os .path .join (outputDir , f'video /{ i } ' )
109
109
videoOutPaths .append (path )
110
110
111
111
arrayIndex = 0
@@ -188,13 +188,14 @@ def voice_clone_main(net, prompt_text, prompt_audio, lang):
188
188
#视频,请实现播报视频生成
189
189
print (f"请完成播报视频生成能力" )
190
190
current_root_path = os .path .split (sys .argv [0 ])[0 ]
191
- exitPaths = os .listdir ("infer_results/audio" )
191
+ tmp_path = os .path .join (opt .outputDir ,"audio" )
192
+ exitPaths = os .listdir (tmp_path )
192
193
for i in range (len (exitPaths )):
193
194
194
195
# pic_path = opt.source_image
195
196
# audio_path = opt.driven_audio
196
- pic_path = os .path .join (picInputPaths [i + 1 ],"index.png" )
197
- audio_path = os .path .join ("infer_results/audio" ,str (i + 1 )+ "/" + str (timestringCounts [i ])+ "_chinese.wav" )
197
+ pic_path = os .path .join (picInputPaths [i ],"index.png" )
198
+ audio_path = os .path .join (tmp_path ,str (i + 1 )+ "/" + str (timestringCounts [i ])+ "_chinese.wav" )
198
199
199
200
# save_dir = os.path.join(args.result_dir, strftime("%Y_%m_%d_%H.%M.%S"))
200
201
save_dir = os .path .join (opt .outputDir , "video/" + str (i + 1 )+ '/' )
@@ -297,4 +298,4 @@ def voice_clone_main(net, prompt_text, prompt_audio, lang):
297
298
print ("生成完成!" )
298
299
299
300
except KeyboardInterrupt :
300
- print ("程序已停止。" )
301
+ print ("程序已停止。" )
0 commit comments