08-19-1051, chapter 3.2.2

This commit is contained in:
xiaolai
2024-08-19 10:52:03 +08:00
parent 96f0145f2b
commit c9f2e70b8d
70 changed files with 94 additions and 46 deletions

View File

@@ -29,7 +29,7 @@
},
{
"cell_type": "code",
"execution_count": 9,
"execution_count": 19,
"id": "71d35cd9",
"metadata": {},
"outputs": [
@@ -38,9 +38,12 @@
"output_type": "stream",
"text": [
"['en-US-GuyNeural', 'en-US-AriaNeural']\n",
"big\n",
"../audios/big-stop-us-male.mp3 created\n",
"../audios/big-stop-us-female.mp3 created\n"
"manhatten\n",
"../audios/manhatten-us-male.mp3 created\n",
"../audios/manhatten-us-female.mp3 created\n",
" newton\n",
"../audios/newton-us-male.mp3 created\n",
"../audios/newton-us-female.mp3 created\n"
]
}
],
@@ -85,7 +88,7 @@
" print(voices)\n",
"\n",
"words = \"\"\"\n",
"big\n",
"\n",
"\"\"\"\n",
"\n",
"for word in words.strip().split(','):\n",
@@ -93,8 +96,8 @@
" for i, voice in enumerate(voices):\n",
" w = word.strip().lower()\n",
" if len(w) > 0:\n",
" filename = f'../audios/{w}-stop-{regions[i]}-{genders[i]}.mp3'\n",
" await generate_edge_tts_audio(w, filename, voice=voice, verbose=True, overwrite=False, play=True)\n"
" filename = f'../audios/{w}-{regions[i]}-{genders[i]}.mp3'\n",
" await generate_edge_tts_audio(w, filename, voice=voice, verbose=True, overwrite=True, play=True)\n"
]
},
{