Ryanus commited on
Commit
7132c12
·
verified ·
1 Parent(s): dc13970

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -33,7 +33,8 @@ async def get_voices():
33
  獲取 Edge TTS 可用的語音列表。
34
  """
35
  voices = await edge_tts.list_voices()
36
- return [voice.ShortName for voice in voices]
 
37
 
38
  # Gradio 介面函數
39
  async def tts_interface(text, voice, rate_percentage, pitch_hz):
 
33
  獲取 Edge TTS 可用的語音列表。
34
  """
35
  voices = await edge_tts.list_voices()
36
+ # 修正這裡,使用字典鍵 'ShortName' 來訪問語音名稱
37
+ return [voice["ShortName"] for voice in voices]
38
 
39
  # Gradio 介面函數
40
  async def tts_interface(text, voice, rate_percentage, pitch_hz):