XuminYu commited on
Commit
c181c85
1 Parent(s): 18e4ba8
Files changed (2) hide show
  1. app.py +6 -5
  2. hash_code_for_cached_output.py +5 -5
app.py CHANGED
@@ -64,12 +64,13 @@ def predict(prompt, style, audio_file_pth, speed, agree):
64
  # Before we get into inference, we will detect if it is from example table or default value
65
  # If so, we use a cached Audio. Noted that, it is just for demo efficiency.
66
  # hash code were generated by `hash_code_for_cached_output.py`
 
67
  cached_outputs = {
68
- "d0f5806f6e_60565a5c20_en_us" : "cached_outputs/0.wav",
69
- "d0f5806f6e_420ab8211d_en_us" : "cached_outputs/1.wav",
70
- "6e8a024342_0f96bf44f5_es_default" : "cached_outputs/2.wav",
71
- "54ad3237d7_3fef5adc6f_zh_default" : "cached_outputs/3.wav",
72
- "8190e911f8_9897b60a4e_jp_default" : "cached_outputs/4.wav"
73
  }
74
  unique_code = hash_code_for_cached_output.get_unique_code(audio_file_pth, prompt, style)
75
  print("audio_file_pth is", audio_file_pth)
 
64
  # Before we get into inference, we will detect if it is from example table or default value
65
  # If so, we use a cached Audio. Noted that, it is just for demo efficiency.
66
  # hash code were generated by `hash_code_for_cached_output.py`
67
+ # this hash get from gradio console
68
  cached_outputs = {
69
+ "af39e1f1ff_60565a5c20_en_us" : "cached_outputs/0.wav",
70
+ "af39e1f1ff_420ab8211d_en_us" : "cached_outputs/1.wav",
71
+ "ced034cc22_0f96bf44f5_es_default" : "cached_outputs/2.wav",
72
+ "d3172b178d_3fef5adc6f_zh_default" : "cached_outputs/3.wav",
73
+ "cda6998e1a_9897b60a4e_jp_default" : "cached_outputs/4.wav"
74
  }
75
  unique_code = hash_code_for_cached_output.get_unique_code(audio_file_pth, prompt, style)
76
  print("audio_file_pth is", audio_file_pth)
hash_code_for_cached_output.py CHANGED
@@ -26,27 +26,27 @@ if __name__ == '__main__':
26
  {
27
  "text": "The bustling city square bustled with street performers, tourists, and local vendors.",
28
  "language": 'en_us',
29
- "reference_speaker": "examples/speaker0.mp3"
30
  },
31
  {
32
  "text": "Did you ever hear a folk tale about a giant turtle?",
33
  "language": 'en_us',
34
- "reference_speaker": "examples/speaker0.mp3"
35
  },
36
  {
37
  "text": "El resplandor del sol acaricia las olas, pintando el cielo con una paleta deslumbrante.",
38
  "language": 'es_default',
39
- "reference_speaker": "examples/speaker1.mp3",
40
  },
41
  {
42
  "text": "我最近在学习machine learning,希望能够在未来的artificial intelligence领域有所建树。",
43
  "language": 'zh_default',
44
- "reference_speaker": "examples/speaker2.mp3",
45
  },
46
  {
47
  "text": "彼は毎朝ジョギングをして体を健康に保っています。",
48
  "language": 'jp_default',
49
- "reference_speaker": "examples/speaker3.mp3",
50
  }
51
  ]
52
 
 
26
  {
27
  "text": "The bustling city square bustled with street performers, tourists, and local vendors.",
28
  "language": 'en_us',
29
+ "reference_speaker": "/tmp/gradio/971e5614c2398ed64e7c476251ec42cdb699d033/speaker0-0-100.wav"
30
  },
31
  {
32
  "text": "Did you ever hear a folk tale about a giant turtle?",
33
  "language": 'en_us',
34
+ "reference_speaker": "/tmp/gradio/971e5614c2398ed64e7c476251ec42cdb699d033/speaker0-0-100.wav"
35
  },
36
  {
37
  "text": "El resplandor del sol acaricia las olas, pintando el cielo con una paleta deslumbrante.",
38
  "language": 'es_default',
39
+ "reference_speaker": "/tmp/gradio/aee184926eca7bb464419ac1e8052907928c68fa/speaker1-0-100.wav",
40
  },
41
  {
42
  "text": "我最近在学习machine learning,希望能够在未来的artificial intelligence领域有所建树。",
43
  "language": 'zh_default',
44
+ "reference_speaker": "/tmp/gradio/8373380c451c716ded54e6d1de959cc7c5fc4d72/speaker2-0-100.wav",
45
  },
46
  {
47
  "text": "彼は毎朝ジョギングをして体を健康に保っています。",
48
  "language": 'jp_default',
49
+ "reference_speaker": "/tmp/gradio/5faad1507b5d6bc61a39ca3184db5a7b554a7479/speaker3-0-100.wav",
50
  }
51
  ]
52