您的位置:首页 > 技术中心 > 其他 >

如何用Python将PDF转换为MP3。

时间:2023-05-09 23:20

一、PDF转为MP3

我们平常看到很多文件都是PDF格式,网上的各类书籍多为此格式。有时候不方便阅读,或者怕费眼睛伤颈椎,那么有没有一种方法可以把它变为音频,这样上下班路上也就可以听一听。

这里做个科普,什么是TTS?TTS(Text To Speech,文本转语音)是语音合成应用的一种,它将储存于电脑中的文件,如帮助文件或者网页,转换成自然语音输出。edge-tts就是将微软的语音合成技术,他是将edge浏览器里提供的tts打包成Python第三方包,这样就可以免费调用微软的语音合成技术。

二、准备工作

将PDF转为音频MP3文件,需要两步。第一步,将pdf转为txt文本;第二步,将txt转为音频。所以我们需要以下两个库。

1. 安装pdfplumber包,用于将pdf转为txt

(base) C:UsersAdministrator>pip install pdfplumber
Collecting pdfplumber
Downloading pdfplumber-0.9.0-py3-none-any.whl (46 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 46.1/46.1 kB 385.4 kB/s eta 0:00:00
Collecting pdfminer.six==20221105
Downloading pdfminer.six-20221105-py3-none-any.whl (5.6 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 5.6/5.6 MB 8.1 MB/s eta 0:00:00
Collecting Wand>=0.6.10
Downloading Wand-0.6.11-py2.py3-none-any.whl (143 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 143.6/143.6 kB ? eta 0:00:00
Requirement already satisfied: Pillow>=9.1 in d:programdataanaconda3libsite-packages (from pdfplumber) (9.4.0)
Requirement already satisfied: charset-normalizer>=2.0.0 in d:programdataanaconda3libsite-packages (from pdfminer.six==20221105->pdfplumber) (2.0.4)
Requirement already satisfied: cryptography>=36.0.0 in d:programdataanaconda3libsite-packages (from pdfminer.six==20221105->pdfplumber) (39.0.1)
Requirement already satisfied: cffi>=1.12 in d:programdataanaconda3libsite-packages (from cryptography>=36.0.0->pdfminer.six==20221105->pdfplumber) (1.15.1)
Requirement already satisfied: pycparser in d:programdataanaconda3libsite-packages (from cffi>=1.12->cryptography>=36.0.0->pdfminer.six==20221105->pdfplumber) (2.21)
Installing collected packages: Wand, pdfminer.six, pdfplumber
Successfully installed Wand-0.6.11 pdfminer.six-20221105 pdfplumber-0.9.0

2. 安装edge-tts包,用于将txt转为音频

(base) C:UsersAdministrator>pip install edge-tts
Collecting edge-tts
Downloading edge_tts-6.1.5-py3-none-any.whl (27 kB)
Requirement already satisfied: aiohttp>=3.8.0 in d:programdataanaconda3libsite-packages (from edge-tts) (3.8.4)
Requirement already satisfied: yarl<2.0,>=1.0 in d:programdataanaconda3libsite-packages (from aiohttp>=3.8.0->edge-tts) (1.8.2)
Requirement already satisfied: multidict<7.0,>=4.5 in d:programdataanaconda3libsite-packages (from aiohttp>=3.8.0->edge-tts) (6.0.4)
Requirement already satisfied: frozenlist>=1.1.1 in d:programdataanaconda3libsite-packages (from aiohttp>=3.8.0->edge-tts) (1.3.3)
Requirement already satisfied: attrs>=17.3.0 in d:programdataanaconda3libsite-packages (from aiohttp>=3.8.0->edge-tts) (22.1.0)
Requirement already satisfied: async-timeout<5.0,>=4.0.0a3 in d:programdataanaconda3libsite-packages (from aiohttp>=3.8.0->edge-tts) (4.0.2)
Requirement already satisfied: aiosignal>=1.1.2 in d:programdataanaconda3libsite-packages (from aiohttp>=3.8.0->edge-tts) (1.3.1)
Requirement already satisfied: charset-normalizer<4.0,>=2.0 in d:programdataanaconda3libsite-packages (from aiohttp>=3.8.0->edge-tts) (2.0.4)
Requirement already satisfied: idna>=2.0 in d:programdataanaconda3libsite-packages (from yarl<2.0,>=1.0->aiohttp>=3.8.0->edge-tts) (3.4)
Installing collected packages: edge-tts
Successfully installed edge-tts-6.1.5

三、代码很简单

# -*- coding: utf-8 -*-import pdfplumberimport asyncio  import osimport edge_tts  from edge_tts import VoicesManager  async def txt2mp3(txt,mp3,announcer='Microsoft Server Speech Text to Speech Voice (zh-CN, XiaoxiaoNeural)') -> None:    # 将文本转换为mp3音频    communicate = edge_tts.Communicate(txt, announcer)      await communicate.save(mp3)async def get_announcer(Gender="Female", Language="zh"):    voices = await VoicesManager.create()      voice = voices.find(Gender=Gender, Language=Language)    print(voice)if __name__ == "__main__":      rootdir = 'd:\python_csdn\files\'    filename = '道德经.pdf'    pdf_path = rootdir+filename    announcer='Microsoft Server Speech Text to Speech Voice (zh-CN, XiaoxiaoNeural)'    if 0:        # 查看可用播音角色(性别女性,语言为中文)        asyncio.run(get_announcer(Gender="Female", Language="zh"))            if 1:        # 读取pdf并提取文本到txt文件,并将其内容转为mp3音频文件。        page_num = 0        with pdfplumber.open(pdf_path) as pdf:            for page in pdf.pages:                textdata = page.extract_text().replace("
", "")#提取文字后删除末尾换行,以免转音频卡顿                page_num += 1                txt_path = pdf_path.split(".")[0]+"{:03d}".format(page_num)+'.txt'                if len(textdata)>0:                    with open(txt_path ,'a',encoding='utf-8') as txt:                        txt.write(textdata)                        print('第'+str(page_num)+'页:',textdata)                        mp3_path = txt_path.split(".")[0]+'.mp3'                        asyncio.run(txt2mp3(textdata,mp3_path))                        print('第'+str(page_num)+'个txt文件已转音频:',mp3_path)        print('Pdf文件共有'+str(page_num)+'页,已转换完成')

很快就搞定啦,见下图。以后再想听PDF就把上面代码跑起来!

Python怎么实现PDF转MP3

四、变更播音员

在以上程序中修改以下代码if条件为1,即可查看可用播音角色。

    if 1:        # 查看可用播音角色(性别女性,语言为中文),男性Gender="Male"        asyncio.run(get_announcer(Gender="Female", Language="zh"))

运行后结果为一个list,通过json格式化后,如下所示。变更播音员只需要使用Name值替换前面announcer值即可。是不是很简单?

[{    'Name': 'Microsoft Server Speech Text to Speech Voice (zh-HK, HiuGaaiNeural)',    'ShortName': 'zh-HK-HiuGaaiNeural',    'Gender': 'Female',    'Locale': 'zh-HK',    'SuggestedCodec': 'audio-24khz-48kbitrate-mono-mp3',    'FriendlyName': 'Microsoft HiuGaai Online (Natural) - Chinese (Cantonese Traditional)',    'Status': 'GA',    'VoiceTag': {        'ContentCategories': ['General'],        'VoicePersonalities': ['Friendly', 'Positive']    },    'Language': 'zh'}, {    'Name': 'Microsoft Server Speech Text to Speech Voice (zh-HK, HiuMaanNeural)',    'ShortName': 'zh-HK-HiuMaanNeural',    'Gender': 'Female',    'Locale': 'zh-HK',    'SuggestedCodec': 'audio-24khz-48kbitrate-mono-mp3',    'FriendlyName': 'Microsoft HiuMaan Online (Natural) - Chinese (Hong Kong)',    'Status': 'GA',    'VoiceTag': {        'ContentCategories': ['General'],        'VoicePersonalities': ['Friendly', 'Positive']    },    'Language': 'zh'}, {    'Name': 'Microsoft Server Speech Text to Speech Voice (zh-CN, XiaoxiaoNeural)',    'ShortName': 'zh-CN-XiaoxiaoNeural',    'Gender': 'Female',    'Locale': 'zh-CN',    'SuggestedCodec': 'audio-24khz-48kbitrate-mono-mp3',    'FriendlyName': 'Microsoft Xiaoxiao Online (Natural) - Chinese (Mainland)',    'Status': 'GA',    'VoiceTag': {        'ContentCategories': ['News', 'Novel'],        'VoicePersonalities': ['Warm']    },    'Language': 'zh'}, {    'Name': 'Microsoft Server Speech Text to Speech Voice (zh-CN, XiaoyiNeural)',    'ShortName': 'zh-CN-XiaoyiNeural',    'Gender': 'Female',    'Locale': 'zh-CN',    'SuggestedCodec': 'audio-24khz-48kbitrate-mono-mp3',    'FriendlyName': 'Microsoft Xiaoyi Online (Natural) - Chinese (Mainland)',    'Status': 'GA',    'VoiceTag': {        'ContentCategories': ['Cartoon', 'Novel'],        'VoicePersonalities': ['Lively']    },    'Language': 'zh'}, {    'Name': 'Microsoft Server Speech Text to Speech Voice (zh-CN-liaoning, XiaobeiNeural)',    'ShortName': 'zh-CN-liaoning-XiaobeiNeural',    'Gender': 'Female',    'Locale': 'zh-CN-liaoning',    'SuggestedCodec': 'audio-24khz-48kbitrate-mono-mp3',    'FriendlyName': 'Microsoft Xiaobei Online (Natural) - Chinese (Northeastern Mandarin)',    'Status': 'GA',    'VoiceTag': {        'ContentCategories': ['Dialect'],        'VoicePersonalities': ['Humorous']    },    'Language': 'zh'}, {    'Name': 'Microsoft Server Speech Text to Speech Voice (zh-TW, HsiaoChenNeural)',    'ShortName': 'zh-TW-HsiaoChenNeural',    'Gender': 'Female',    'Locale': 'zh-TW',    'SuggestedCodec': 'audio-24khz-48kbitrate-mono-mp3',    'FriendlyName': 'Microsoft HsiaoChen Online (Natural) - Chinese (Taiwan)',    'Status': 'GA',    'VoiceTag': {        'ContentCategories': ['General'],        'VoicePersonalities': ['Friendly', 'Positive']    },    'Language': 'zh'}, {    'Name': 'Microsoft Server Speech Text to Speech Voice (zh-TW, HsiaoYuNeural)',    'ShortName': 'zh-TW-HsiaoYuNeural',    'Gender': 'Female',    'Locale': 'zh-TW',    'SuggestedCodec': 'audio-24khz-48kbitrate-mono-mp3',    'FriendlyName': 'Microsoft HsiaoYu Online (Natural) - Chinese (Taiwanese Mandarin)',    'Status': 'GA',    'VoiceTag': {        'ContentCategories': ['General'],        'VoicePersonalities': ['Friendly', 'Positive']    },    'Language': 'zh'}, {    'Name': 'Microsoft Server Speech Text to Speech Voice (zh-CN-shaanxi, XiaoniNeural)',    'ShortName': 'zh-CN-shaanxi-XiaoniNeural',    'Gender': 'Female',    'Locale': 'zh-CN-shaanxi',    'SuggestedCodec': 'audio-24khz-48kbitrate-mono-mp3',    'FriendlyName': 'Microsoft Xiaoni Online (Natural) - Chinese (Zhongyuan Mandarin Shaanxi)',    'Status': 'GA',    'VoiceTag': {        'ContentCategories': ['Dialect'],        'VoicePersonalities': ['Bright']    },    'Language': 'zh'}]

总结

查看所有播音角色,执行命令:>edge-tts --list-voices

(base) C:UsersAdministrator>edge-tts --list-voicesName: af-ZA-AdriNeuralGender: FemaleName: af-ZA-WillemNeuralGender: MaleName: am-ET-AmehaNeuralGender: MaleName: am-ET-MekdesNeuralGender: FemaleName: ar-AE-FatimaNeuralGender: FemaleName: ar-AE-HamdanNeuralGender: MaleName: ar-BH-AliNeuralGender: MaleName: ar-BH-LailaNeuralGender: FemaleName: ar-DZ-AminaNeuralGender: FemaleName: ar-DZ-IsmaelNeuralGender: MaleName: ar-EG-SalmaNeuralGender: FemaleName: ar-EG-ShakirNeuralGender: MaleName: ar-IQ-BasselNeuralGender: MaleName: ar-IQ-RanaNeuralGender: FemaleName: ar-JO-SanaNeuralGender: FemaleName: ar-JO-TaimNeuralGender: MaleName: ar-KW-FahedNeuralGender: MaleName: ar-KW-NouraNeuralGender: FemaleName: ar-LB-LaylaNeuralGender: FemaleName: ar-LB-RamiNeuralGender: MaleName: ar-LY-ImanNeuralGender: FemaleName: ar-LY-OmarNeuralGender: MaleName: ar-MA-JamalNeuralGender: MaleName: ar-MA-MounaNeuralGender: FemaleName: ar-OM-AbdullahNeuralGender: MaleName: ar-OM-AyshaNeuralGender: FemaleName: ar-QA-AmalNeuralGender: FemaleName: ar-QA-MoazNeuralGender: MaleName: ar-SA-HamedNeuralGender: MaleName: ar-SA-ZariyahNeuralGender: FemaleName: ar-SY-AmanyNeuralGender: FemaleName: ar-SY-LaithNeuralGender: MaleName: ar-TN-HediNeuralGender: MaleName: ar-TN-ReemNeuralGender: FemaleName: ar-YE-MaryamNeuralGender: FemaleName: ar-YE-SalehNeuralGender: MaleName: az-AZ-BabekNeuralGender: MaleName: az-AZ-BanuNeuralGender: FemaleName: bg-BG-BorislavNeuralGender: MaleName: bg-BG-KalinaNeuralGender: FemaleName: bn-BD-NabanitaNeuralGender: FemaleName: bn-BD-PradeepNeuralGender: MaleName: bn-IN-BashkarNeuralGender: MaleName: bn-IN-TanishaaNeuralGender: FemaleName: bs-BA-GoranNeuralGender: MaleName: bs-BA-VesnaNeuralGender: FemaleName: ca-ES-EnricNeuralGender: MaleName: ca-ES-JoanaNeuralGender: FemaleName: cs-CZ-AntoninNeuralGender: MaleName: cs-CZ-VlastaNeuralGender: FemaleName: cy-GB-AledNeuralGender: MaleName: cy-GB-NiaNeuralGender: FemaleName: da-DK-ChristelNeuralGender: FemaleName: da-DK-JeppeNeuralGender: MaleName: de-AT-IngridNeuralGender: FemaleName: de-AT-JonasNeuralGender: MaleName: de-CH-JanNeuralGender: MaleName: de-CH-LeniNeuralGender: FemaleName: de-DE-AmalaNeuralGender: FemaleName: de-DE-ConradNeuralGender: MaleName: de-DE-KatjaNeuralGender: FemaleName: de-DE-KillianNeuralGender: MaleName: el-GR-AthinaNeuralGender: FemaleName: el-GR-NestorasNeuralGender: MaleName: en-AU-NatashaNeuralGender: FemaleName: en-AU-WilliamNeuralGender: MaleName: en-CA-ClaraNeuralGender: FemaleName: en-CA-LiamNeuralGender: MaleName: en-GB-LibbyNeuralGender: FemaleName: en-GB-MaisieNeuralGender: FemaleName: en-GB-RyanNeuralGender: MaleName: en-GB-SoniaNeuralGender: FemaleName: en-GB-ThomasNeuralGender: MaleName: en-HK-SamNeuralGender: MaleName: en-HK-YanNeuralGender: FemaleName: en-IE-ConnorNeuralGender: MaleName: en-IE-EmilyNeuralGender: FemaleName: en-IN-NeerjaExpressiveNeuralGender: FemaleName: en-IN-NeerjaNeuralGender: FemaleName: en-IN-PrabhatNeuralGender: MaleName: en-KE-AsiliaNeuralGender: FemaleName: en-KE-ChilembaNeuralGender: MaleName: en-NG-AbeoNeuralGender: MaleName: en-NG-EzinneNeuralGender: FemaleName: en-NZ-MitchellNeuralGender: MaleName: en-NZ-MollyNeuralGender: FemaleName: en-PH-JamesNeuralGender: MaleName: en-PH-RosaNeuralGender: FemaleName: en-SG-LunaNeuralGender: FemaleName: en-SG-WayneNeuralGender: MaleName: en-TZ-ElimuNeuralGender: MaleName: en-TZ-ImaniNeuralGender: FemaleName: en-US-AnaNeuralGender: FemaleName: en-US-AriaNeuralGender: FemaleName: en-US-ChristopherNeuralGender: MaleName: en-US-EricNeuralGender: MaleName: en-US-GuyNeuralGender: MaleName: en-US-JennyNeuralGender: FemaleName: en-US-MichelleNeuralGender: FemaleName: en-US-RogerNeuralGender: MaleName: en-US-SteffanNeuralGender: MaleName: en-ZA-LeahNeuralGender: FemaleName: en-ZA-LukeNeuralGender: MaleName: es-AR-ElenaNeuralGender: FemaleName: es-AR-TomasNeuralGender: MaleName: es-BO-MarceloNeuralGender: MaleName: es-BO-SofiaNeuralGender: FemaleName: es-CL-CatalinaNeuralGender: FemaleName: es-CL-LorenzoNeuralGender: MaleName: es-CO-GonzaloNeuralGender: MaleName: es-CO-SalomeNeuralGender: FemaleName: es-CR-JuanNeuralGender: MaleName: es-CR-MariaNeuralGender: FemaleName: es-CU-BelkysNeuralGender: FemaleName: es-CU-ManuelNeuralGender: MaleName: es-DO-EmilioNeuralGender: MaleName: es-DO-RamonaNeuralGender: FemaleName: es-EC-AndreaNeuralGender: FemaleName: es-EC-LuisNeuralGender: MaleName: es-ES-AlvaroNeuralGender: MaleName: es-ES-ElviraNeuralGender: FemaleName: es-GQ-JavierNeuralGender: MaleName: es-GQ-TeresaNeuralGender: FemaleName: es-GT-AndresNeuralGender: MaleName: es-GT-MartaNeuralGender: FemaleName: es-HN-CarlosNeuralGender: MaleName: es-HN-KarlaNeuralGender: FemaleName: es-MX-DaliaNeuralGender: FemaleName: es-MX-JorgeNeuralGender: MaleName: es-NI-FedericoNeuralGender: MaleName: es-NI-YolandaNeuralGender: FemaleName: es-PA-MargaritaNeuralGender: FemaleName: es-PA-RobertoNeuralGender: MaleName: es-PE-AlexNeuralGender: MaleName: es-PE-CamilaNeuralGender: FemaleName: es-PR-KarinaNeuralGender: FemaleName: es-PR-VictorNeuralGender: MaleName: es-PY-MarioNeuralGender: MaleName: es-PY-TaniaNeuralGender: FemaleName: es-SV-LorenaNeuralGender: FemaleName: es-SV-RodrigoNeuralGender: MaleName: es-US-AlonsoNeuralGender: MaleName: es-US-PalomaNeuralGender: FemaleName: es-UY-MateoNeuralGender: MaleName: es-UY-ValentinaNeuralGender: FemaleName: es-VE-PaolaNeuralGender: FemaleName: es-VE-SebastianNeuralGender: MaleName: et-EE-AnuNeuralGender: FemaleName: et-EE-KertNeuralGender: MaleName: fa-IR-DilaraNeuralGender: FemaleName: fa-IR-FaridNeuralGender: MaleName: fi-FI-HarriNeuralGender: MaleName: fi-FI-NooraNeuralGender: FemaleName: fil-PH-AngeloNeuralGender: MaleName: fil-PH-BlessicaNeuralGender: FemaleName: fr-BE-CharlineNeuralGender: FemaleName: fr-BE-GerardNeuralGender: MaleName: fr-CA-AntoineNeuralGender: MaleName: fr-CA-JeanNeuralGender: MaleName: fr-CA-SylvieNeuralGender: FemaleName: fr-CH-ArianeNeuralGender: FemaleName: fr-CH-FabriceNeuralGender: MaleName: fr-FR-DeniseNeuralGender: FemaleName: fr-FR-EloiseNeuralGender: FemaleName: fr-FR-HenriNeuralGender: MaleName: ga-IE-ColmNeuralGender: MaleName: ga-IE-OrlaNeuralGender: FemaleName: gl-ES-RoiNeuralGender: MaleName: gl-ES-SabelaNeuralGender: FemaleName: gu-IN-DhwaniNeuralGender: FemaleName: gu-IN-NiranjanNeuralGender: MaleName: he-IL-AvriNeuralGender: MaleName: he-IL-HilaNeuralGender: FemaleName: hi-IN-MadhurNeuralGender: MaleName: hi-IN-SwaraNeuralGender: FemaleName: hr-HR-GabrijelaNeuralGender: FemaleName: hr-HR-SreckoNeuralGender: MaleName: hu-HU-NoemiNeuralGender: FemaleName: hu-HU-TamasNeuralGender: MaleName: id-ID-ArdiNeuralGender: MaleName: id-ID-GadisNeuralGender: FemaleName: is-IS-GudrunNeuralGender: FemaleName: is-IS-GunnarNeuralGender: MaleName: it-IT-DiegoNeuralGender: MaleName: it-IT-ElsaNeuralGender: FemaleName: it-IT-IsabellaNeuralGender: FemaleName: ja-JP-KeitaNeuralGender: MaleName: ja-JP-NanamiNeuralGender: FemaleName: jv-ID-DimasNeuralGender: MaleName: jv-ID-SitiNeuralGender: FemaleName: ka-GE-EkaNeuralGender: FemaleName: ka-GE-GiorgiNeuralGender: MaleName: kk-KZ-AigulNeuralGender: FemaleName: kk-KZ-DauletNeuralGender: MaleName: km-KH-PisethNeuralGender: MaleName: km-KH-SreymomNeuralGender: FemaleName: kn-IN-GaganNeuralGender: MaleName: kn-IN-SapnaNeuralGender: FemaleName: ko-KR-InJoonNeuralGender: MaleName: ko-KR-SunHiNeuralGender: FemaleName: lo-LA-ChanthavongNeuralGender: MaleName: lo-LA-KeomanyNeuralGender: FemaleName: lt-LT-LeonasNeuralGender: MaleName: lt-LT-OnaNeuralGender: FemaleName: lv-LV-EveritaNeuralGender: FemaleName: lv-LV-NilsNeuralGender: MaleName: mk-MK-AleksandarNeuralGender: MaleName: mk-MK-MarijaNeuralGender: FemaleName: ml-IN-MidhunNeuralGender: MaleName: ml-IN-SobhanaNeuralGender: FemaleName: mn-MN-BataaNeuralGender: MaleName: mn-MN-YesuiNeuralGender: FemaleName: mr-IN-AarohiNeuralGender: FemaleName: mr-IN-ManoharNeuralGender: MaleName: ms-MY-OsmanNeuralGender: MaleName: ms-MY-YasminNeuralGender: FemaleName: mt-MT-GraceNeuralGender: FemaleName: mt-MT-JosephNeuralGender: MaleName: my-MM-NilarNeuralGender: FemaleName: my-MM-ThihaNeuralGender: MaleName: nb-NO-FinnNeuralGender: MaleName: nb-NO-PernilleNeuralGender: FemaleName: ne-NP-HemkalaNeuralGender: FemaleName: ne-NP-SagarNeuralGender: MaleName: nl-BE-ArnaudNeuralGender: MaleName: nl-BE-DenaNeuralGender: FemaleName: nl-NL-ColetteNeuralGender: FemaleName: nl-NL-FennaNeuralGender: FemaleName: nl-NL-MaartenNeuralGender: MaleName: pl-PL-MarekNeuralGender: MaleName: pl-PL-ZofiaNeuralGender: FemaleName: ps-AF-GulNawazNeuralGender: MaleName: ps-AF-LatifaNeuralGender: FemaleName: pt-BR-AntonioNeuralGender: MaleName: pt-BR-FranciscaNeuralGender: FemaleName: pt-PT-DuarteNeuralGender: MaleName: pt-PT-RaquelNeuralGender: FemaleName: ro-RO-AlinaNeuralGender: FemaleName: ro-RO-EmilNeuralGender: MaleName: ru-RU-DmitryNeuralGender: MaleName: ru-RU-SvetlanaNeuralGender: FemaleName: si-LK-SameeraNeuralGender: MaleName: si-LK-ThiliniNeuralGender: FemaleName: sk-SK-LukasNeuralGender: MaleName: sk-SK-ViktoriaNeuralGender: FemaleName: sl-SI-PetraNeuralGender: FemaleName: sl-SI-RokNeuralGender: MaleName: so-SO-MuuseNeuralGender: MaleName: so-SO-UbaxNeuralGender: FemaleName: sq-AL-AnilaNeuralGender: FemaleName: sq-AL-IlirNeuralGender: MaleName: sr-RS-NicholasNeuralGender: MaleName: sr-RS-SophieNeuralGender: FemaleName: su-ID-JajangNeuralGender: MaleName: su-ID-TutiNeuralGender: FemaleName: sv-SE-MattiasNeuralGender: MaleName: sv-SE-SofieNeuralGender: FemaleName: sw-KE-RafikiNeuralGender: MaleName: sw-KE-ZuriNeuralGender: FemaleName: sw-TZ-DaudiNeuralGender: MaleName: sw-TZ-RehemaNeuralGender: FemaleName: ta-IN-PallaviNeuralGender: FemaleName: ta-IN-ValluvarNeuralGender: MaleName: ta-LK-KumarNeuralGender: MaleName: ta-LK-SaranyaNeuralGender: FemaleName: ta-MY-KaniNeuralGender: FemaleName: ta-MY-SuryaNeuralGender: MaleName: ta-SG-AnbuNeuralGender: MaleName: ta-SG-VenbaNeuralGender: FemaleName: te-IN-MohanNeuralGender: MaleName: te-IN-ShrutiNeuralGender: FemaleName: th-TH-NiwatNeuralGender: MaleName: th-TH-PremwadeeNeuralGender: FemaleName: tr-TR-AhmetNeuralGender: MaleName: tr-TR-EmelNeuralGender: FemaleName: uk-UA-OstapNeuralGender: MaleName: uk-UA-PolinaNeuralGender: FemaleName: ur-IN-GulNeuralGender: FemaleName: ur-IN-SalmanNeuralGender: MaleName: ur-PK-AsadNeuralGender: MaleName: ur-PK-UzmaNeuralGender: FemaleName: uz-UZ-MadinaNeuralGender: FemaleName: uz-UZ-SardorNeuralGender: MaleName: vi-VN-HoaiMyNeuralGender: FemaleName: vi-VN-NamMinhNeuralGender: MaleName: zh-CN-XiaoxiaoNeuralGender: FemaleName: zh-CN-XiaoyiNeuralGender: FemaleName: zh-CN-YunjianNeuralGender: MaleName: zh-CN-YunxiNeuralGender: MaleName: zh-CN-YunxiaNeuralGender: MaleName: zh-CN-YunyangNeuralGender: MaleName: zh-CN-liaoning-XiaobeiNeuralGender: FemaleName: zh-CN-shaanxi-XiaoniNeuralGender: FemaleName: zh-HK-HiuGaaiNeuralGender: FemaleName: zh-HK-HiuMaanNeuralGender: FemaleName: zh-HK-WanLungNeuralGender: MaleName: zh-TW-HsiaoChenNeuralGender: FemaleName: zh-TW-HsiaoYuNeuralGender: FemaleName: zh-TW-YunJheNeuralGender: MaleName: zu-ZA-ThandoNeuralGender: FemaleName: zu-ZA-ThembaNeuralGender: Male

以上就是如何用Python将PDF转换为MP3。的详细内容,更多请关注Gxl网其它相关文章!

热门排行

今日推荐

热门手游