Win10下使用PowerShelll讓Cortana朗讀小說的小技巧
有位win10用戶向小編咨詢,如何才能讓Cortana朗讀小說呢?Cortana是我們win10系統中的人工智能語音助手,它可以幫我們安排一些日常工作,也能和我們聊天解悶。其實在Cortana中確實是可以朗讀小說的,只是很多的用戶都不知道罷了。不知道也沒有關系,小編今天就跟大家介紹一下如何使用PowerShelll讓Cortana朗讀小說,具體的操作請看下方的圖文教程。

圖1:Cortana

圖2:微軟小娜
方法步驟:1、首先將下面小編列出來的代碼復制粘貼到.psl文件中保存好,沒有可以創建一個。然后運行PowerShell,將.psl文件執行一次。
= '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、運行“控制面板”,在界面中找到“語音識別”選項并單擊打開。在新的界面中單擊“文本到語音轉換”選項,并在預約選擇中選中“Microsoft Hongyu Mobile - Chinese (Simplified, PRC)”選項,單擊“確定”按鈕。

這樣就可以使用微軟小娜朗讀小說了。
3、下面小編給大家分享一段可以讓PowerShell閱讀小說的代碼。將其復制粘貼并保存為.psl文檔。使用鼠標右鍵單擊選擇“打開方式”-“PowerShell運行”。系統會彈出如下圖所示窗口,將小說文本拽入窗口,按下回車鍵之后你就能聽見小娜的聲音了,再次按下回車鍵就可以退出了。
= Read-Host -Prompt '把小說拖到此處并回車開始朗讀'
= New-Object -ComObject SAPI.SpVoice
.Speak(,5)
Read-Host -Prompt '回車退出朗讀'

使用以上方法就可以在Win10中讓小娜為您讀書了,感興趣的用戶可以根據小編的步驟自己設置一下喔!
相關文章:
1. 統信UOS兼容轉安卓App 像使用手機一樣使用電腦2. 教你如何使用兩行代碼激活Windows系統3. Mac版steam錯誤代碼118怎么解決?Mac版steam錯誤代碼118解決教程4. 統信uos系統怎么選擇打印機驅動? uos打印機驅動的兩種選擇方法5. 如何修改Win11上的默認程序?修改Win11默認程序操作步驟6. YunDetectService.exe是什么進程?YunDetectService.exe禁止使用的方法7. macOS Ventura 13.3 正式版發布: 增加了重復照片檢測功能等功能8. 注冊表命令大全 118條常用的注冊表命令集錦9. rsync結合 inotfiy 實現實時備份的問題10. issch.exe是什么進程?issch.exe是不是病毒?