lihaoxin2020 commited on
Commit
545c103
·
1 Parent(s): 4e42c1a
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -689,11 +689,11 @@ def synthandreturn(text):
689
  # URL to download the file from
690
  url = f"https://kotoba-tech-kotoba-speech.hf.space/file={result}"
691
  # Local filename to save the downloaded file
692
- local_filename = result
693
 
694
  # Call the function to download the file
695
- downloaded_file = download_file(url, local_filename)
696
- print(f"File downloaded as: {downloaded_file}")
697
  else:
698
  # result = router.predict(text, model.lower(), api_name="/synthesize")
699
  # result = router.predict(
 
689
  # URL to download the file from
690
  url = f"https://kotoba-tech-kotoba-speech.hf.space/file={result}"
691
  # Local filename to save the downloaded file
692
+ local_filename = '/tmp/' + mkuuid(None) + '.wav'
693
 
694
  # Call the function to download the file
695
+ result = download_file(url, local_filename)
696
+ print(f"File downloaded as: {result}")
697
  else:
698
  # result = router.predict(text, model.lower(), api_name="/synthesize")
699
  # result = router.predict(