pangram and its individual words.

This commit is contained in:
xiaolai
2024-02-24 06:41:17 +08:00
parent 48eb5bd36f
commit e5364b5099
182 changed files with 21 additions and 8 deletions

View File

@@ -76,7 +76,7 @@
"import edge_tts\n",
"import pygame\n",
"\n",
"TEXT = \"happi\"\n",
"TEXT = \"Jane,dramatic,young,girl,loves,to,read,books,at,leisure,in,rooms,or,play,on,a,sunny,day,outdoor,here,and,there,under,the,trees,with,boys,She,vowed,to,buy,a,red,ear,dog,She,thought,it,was,unique,for,sure,Now,she,feeds,it,dough,nuts,and,cheese,bar\"\n",
"Wordlist = TEXT.split(\",\")\n",
"\n",
"for w in Wordlist:\n",
@@ -135,22 +135,32 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 1,
"id": "00939422-fbf9-4842-b82a-b6106624c075",
"metadata": {},
"outputs": [],
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"pygame 2.5.2 (SDL 2.28.3, Python 3.11.5)\n",
"Hello from the pygame community. https://www.pygame.org/contribute.html\n",
"Files created!\n"
]
}
],
"source": [
"import asyncio\n",
"import edge_tts\n",
"import pygame\n",
"\n",
"TEXT = \"goal\"\n",
"TEXT = \"a,and,at,bar,books,boys,buy,cheese,day,dog,dough,dramatic,ear,feeds,for,girl,here,in,it,Jane,leisure,loves,Now,nuts,on,or,outdoor,play,read,red,rooms,She,sunny,sure,the,there,thought,to,trees,under,unique,vowed,was,with,young\"\n",
"Wordlist = TEXT.split(\",\")\n",
"\n",
"for w in Wordlist:\n",
" for VOICE in ['ko-KR-InJoonNeural']:\n",
" for VOICE in ['en-US-GuyNeural', 'en-US-JennyNeural', 'en-GB-RyanNeural', 'en-GB-SoniaNeural']:\n",
" w = w.strip()\n",
" OUTPUT_FILE = f\"{w}-{VOICE.replace('YunxiNeural', 'male').replace('XiaoxiaoNeural', 'female').lower()}.mp3\"\n",
" OUTPUT_FILE = f\"{w}-{VOICE.replace('GuyNeural', 'Guy-Male').replace('JennyNeural', 'Jenny-Female').replace('RyanNeural', 'Ryan-Male').replace('SoniaNeural', 'Sonia-Female').lower()}.mp3\"\n",
" communicate = edge_tts.Communicate(w, VOICE)\n",
" await communicate.save(OUTPUT_FILE) \n",
"\n",