Win10使用PowerShelll讓Cortana朗讀小說的操作技巧
Win10如何使用PowerShelll讓Cortana朗讀小說?Cortana是Win10系統(tǒng)的人工智能助手,可以幫忙處理一些基本任務(wù),比如日程安排、回答問題等,其實(shí)Cortana還有更為強(qiáng)大的功能,比如讓Cortana為我們朗讀小說,這才不浪費(fèi)Cortana甜美的聲音嘛!下面給大家介紹Win10使用PowerShelll讓Cortana朗讀小說的操作技巧。
圖1:Cortana
圖2:來至微軟小娜的問候
Win10如何使用PowerShelll讓Cortana朗讀小說?
1、把下面的代碼復(fù)制為.ps1文件保存好,打開PowerShell(管理員),把執(zhí)行.ps1文件。當(dāng)然也可以復(fù)制之后直接執(zhí)行命令,都是一樣的效果。
01= "HKLM:SOFTWAREMicrosoftSpeech_OneCoreVoicesTokensMSTTS_V110_zhCN_HongyuM"02= "HKLM:SOFTWAREMicrosoftSpeech_OneCoreVoicesTokensMSTTS_V110_zhCN_HongyuMAttributes"03= "HKLM:SOFTWAREMicrosoftSpeechVoicesTokensMSTTS_V110_zhCN_HongyuM"04= "HKLM:SOFTWAREMicrosoftSpeechVoicesTokensMSTTS_V110_zhCN_HongyuMAttributes"05New-Item -Path ,,,06New-ItemProperty -Path , -Name "(default)" -PropertyType string -Value "Microsoft Hongyu Mobile - Chinese (Simplified, PRC)"07New-ItemProperty -Path , -Name LangDataPath -PropertyType string -Value "%windir%Speech_OneCoreEnginesTTSzh-CNMSTTSLoczhCN.dat"08New-ItemProperty -Path , -Name LangUpdateDataDirectory -PropertyType string -Value "%SystemDrive%DataSharedDataSpeech_OneCoreEnginesTTSzh-CN"09New-ItemProperty -Path , -Name VoicePath -PropertyType string -Value "%windir%Speech_OneCoreEnginesTTSzh-CNM2052Hongyu"10New-ItemProperty -Path , -Name VoiceUpdateDataDirectory -PropertyType string -Value "%SystemDrive%DataSharedDataSpeech_OneCoreEnginesTTSzh-CN"11New-ItemProperty -Path , -Name 804 -PropertyType string -Value "Microsoft Hongyu Mobile - Chinese (Simplified, PRC)"12New-ItemProperty -Path , -Name CLSID -PropertyType string -Value "{179F3D56-1B0B-42B2-A962-59B7EF59FE1B}"13New-ItemProperty -Path , -Name Version -PropertyType string -Value "11.0"14New-ItemProperty -Path , -Name Language -PropertyType string -Value "804"15New-ItemProperty -Path , -Name Gender -PropertyType string -Value "Female"16New-ItemProperty -Path , -Name Age -PropertyType string -Value "Adult"17New-ItemProperty -Path , -Name DataVersion -PropertyType string -Value "11.0.2013.1022"18New-ItemProperty -Path , -Name SharedPronunciation -PropertyType string -Value ""19New-ItemProperty -Path , -Name Name -PropertyType string -Value "Microsoft Hongyu Mobile"20New-ItemProperty -Path , -Name Vendor -PropertyType string -Value "Microsoft"21New-ItemProperty -Path , -Name PersonalAssistant -PropertyType string -Value "1"復(fù)制代碼= "HKLM:SOFTWAREMicrosoftSpeech_OneCoreVoicesTokensMSTTS_V110_zhCN_HongyuM"= "HKLM:SOFTWAREMicrosoftSpeech_OneCoreVoicesTokensMSTTS_V110_zhCN_HongyuMAttributes"= "HKLM:SOFTWAREMicrosoftSpeechVoicesTokensMSTTS_V110_zhCN_HongyuM"= "HKLM:SOFTWAREMicrosoftSpeechVoicesTokensMSTTS_V110_zhCN_HongyuMAttributes"New-Item -Path ,,,New-ItemProperty -Path , -Name "(default)" -PropertyType string -Value "Microsoft Hongyu Mobile - Chinese (Simplified, PRC)"New-ItemProperty -Path , -Name LangDataPath -PropertyType string -Value "%windir%Speech_OneCoreEnginesTTSzh-CNMSTTSLoczhCN.dat"New-ItemProperty -Path , -Name LangUpdateDataDirectory -PropertyType string -Value "%SystemDrive%DataSharedDataSpeech_OneCoreEnginesTTSzh-CN"New-ItemProperty -Path , -Name VoicePath -PropertyType string -Value "%windir%Speech_OneCoreEnginesTTSzh-CNM2052Hongyu"New-ItemProperty -Path , -Name VoiceUpdateDataDirectory -PropertyType string -Value "%SystemDrive%DataSharedDataSpeech_OneCoreEnginesTTSzh-CN"New-ItemProperty -Path , -Name 804 -PropertyType string -Value "Microsoft Hongyu Mobile - Chinese (Simplified, PRC)"New-ItemProperty -Path , -Name CLSID -PropertyType string -Value "{179F3D56-1B0B-42B2-A962-59B7EF59FE1B}"New-ItemProperty -Path , -Name Version -PropertyType string -Value "11.0"New-ItemProperty -Path , -Name Language -PropertyType string -Value "804"New-ItemProperty -Path , -Name Gender -PropertyType string -Value "Female"New-ItemProperty -Path , -Name Age -PropertyType string -Value "Adult"New-ItemProperty -Path , -Name DataVersion -PropertyType string -Value "11.0.2013.1022"New-ItemProperty -Path , -Name SharedPronunciation -PropertyType string -Value ""New-ItemProperty -Path , -Name Name -PropertyType string -Value "Microsoft Hongyu Mobile"New-ItemProperty -Path , -Name Vendor -PropertyType string -Value "Microsoft"New-ItemProperty -Path , -Name PersonalAssistant -PropertyType string -Value "1"2、接下來打開“控制面板”,找到“語(yǔ)音識(shí)別”,點(diǎn)擊左側(cè)窗口中的“文本到語(yǔ)音轉(zhuǎn)換”,在“語(yǔ)音選擇”框中選擇“Microsoft Hongyu Mobile - Chinese (Simplified, PRC)”,然后單擊確定按鈕,你就可以讓微軟小娜為你閱讀文本了。閱讀文本內(nèi)容可以使用帶有文本閱讀功能的文本編輯器,或者使用專門的小說閱讀器,大家自己選一個(gè)自己喜歡的就行了。
圖3:選擇小娜的語(yǔ)音
3、下面貼一段用PowerShell閱讀小說的代碼,同樣保存為.ps1文件,然后在.ps1文件上右鍵,選擇“使用“使用PowerShell運(yùn)行”,之后把txt小說拖到PowerShell窗口中,回車,小娜就會(huì)自動(dòng)為你朗讀小說了,再次回車就會(huì)退出朗讀!
01= Read-Host -Prompt "把小說拖到此處并回車開始朗讀"02= New-Object -ComObject SAPI.SpVoice03.Speak(,5)04Read-Host -Prompt "回車退出朗讀"復(fù)制代碼= Read-Host -Prompt "把小說拖到此處并回車開始朗讀"= New-Object -ComObject SAPI.SpVoice.Speak(,5)Read-Host -Prompt "回車退出朗讀"圖4:使用小娜朗讀小說
上述便是讓Cortana為我們朗讀小說的操作方法,喜歡閱讀的伙伴,如果看書看累了,不妨讓小娜為您朗讀哦!
相關(guān)文章:
1. solaris11如何擴(kuò)展資源池?solaris11擴(kuò)展資源池的方法2. Mac無線網(wǎng)絡(luò)怎么設(shè)置?蘋果Mac電腦無線網(wǎng)絡(luò)設(shè)置教程3. centos6.5下kvm環(huán)境搭建詳解4. Debian11怎么查看虛擬內(nèi)存使用情況? 查看進(jìn)程占用虛擬內(nèi)存技巧5. 統(tǒng)信UOS怎么設(shè)置不讓瀏覽器上網(wǎng)? UOS禁止瀏覽器訪問網(wǎng)絡(luò)的技巧6. Win10打印機(jī)驅(qū)動(dòng)如何清除與安裝?Win10清除與安裝打印機(jī)驅(qū)動(dòng)步驟7. Win11 正式版 Build 22621.1105一月累積更新補(bǔ)丁KB5022303發(fā)布(附完整更新日志)8. 在CentOS或RHEL 7上修改主機(jī)名的方法9. 什么是Unix 以及它為什么這么重要?10. 老毛桃winpe系統(tǒng)對(duì)注冊(cè)表信息進(jìn)行備份的方法
