Update app.py
Browse files
app.py
CHANGED
|
@@ -33,7 +33,8 @@ async def get_voices():
|
|
| 33 |
獲取 Edge TTS 可用的語音列表。
|
| 34 |
"""
|
| 35 |
voices = await edge_tts.list_voices()
|
| 36 |
-
|
|
|
|
| 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):
|