wsj1995 commited on
Commit
784362e
·
1 Parent(s): 60af38e

feat: result

Browse files
Files changed (1) hide show
  1. GPT_SoVITS/inference_webui.py +3 -3
GPT_SoVITS/inference_webui.py CHANGED
@@ -1099,7 +1099,7 @@ def run(
1099
  )
1100
  opt_sr, audio_data = next(result)
1101
  uploadAudio(opt_sr, audio_data, uploadParams)
1102
- return result
1103
  except Exception as e:
1104
  errCallback(errCallbackUrl, e)
1105
  yield 0, None
@@ -1111,9 +1111,9 @@ def errCallback(errCallbackUrl, e):
1111
 
1112
 
1113
  def uploadAudio(opt_sr, audio_int16, uploadParams):
1114
- print('上传音频', uploadParams)
1115
  if not uploadParams:
1116
  return
 
1117
  uploadParams = json.loads(uploadParams)
1118
  bio = io.BytesIO()
1119
  write(bio, opt_sr, audio_int16)
@@ -1123,7 +1123,7 @@ def uploadAudio(opt_sr, audio_int16, uploadParams):
1123
  url = uploadParams['url']
1124
  del uploadParams['url']
1125
  response = requests.post(url, files=files, data=uploadParams)
1126
- print(response.text)
1127
 
1128
 
1129
  def split(todo_text):
 
1099
  )
1100
  opt_sr, audio_data = next(result)
1101
  uploadAudio(opt_sr, audio_data, uploadParams)
1102
+ yield opt_sr, audio_data
1103
  except Exception as e:
1104
  errCallback(errCallbackUrl, e)
1105
  yield 0, None
 
1111
 
1112
 
1113
  def uploadAudio(opt_sr, audio_int16, uploadParams):
 
1114
  if not uploadParams:
1115
  return
1116
+ print('上传音频', uploadParams)
1117
  uploadParams = json.loads(uploadParams)
1118
  bio = io.BytesIO()
1119
  write(bio, opt_sr, audio_int16)
 
1123
  url = uploadParams['url']
1124
  del uploadParams['url']
1125
  response = requests.post(url, files=files, data=uploadParams)
1126
+ print('上传结果', response.json())
1127
 
1128
 
1129
  def split(todo_text):