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

圖1:Cortana

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

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

使用以上方法就可以在Win10中讓小娜為您讀書了,感興趣的用戶可以根據(jù)小編的步驟自己設(shè)置一下喔!
相關(guān)文章:
1. 怎么手動精簡Win7系統(tǒng)?Win7系統(tǒng)太大如何精簡呢?2. Win7電腦開機(jī)出現(xiàn)0xc0000102錯誤如何解決?3. Mac OS X 10.2 的按鍵(E)4. 不得不看 Win XP 系統(tǒng)寬帶應(yīng)用技巧5. Win7系統(tǒng)更新聲卡提示安裝realtek hd audio driver失敗的解決方法6. 聯(lián)想ThinkPad品牌Win8平板電腦7. vmware虛擬機(jī)安裝mac os x 10.10系統(tǒng)的方法8. Mac OS X 10.2 的按鍵(C)9. Windows8和Windows Phone8中IE10兩者相同點和區(qū)別10. 秘籍:WinXP應(yīng)用技巧大總結(jié)(二)
