當(dāng)前位置:愛(ài)純凈 > 系統(tǒng)教程 > W10純凈版使用PowerShelll讓Cortana朗讀小說(shuō)的操作技巧

W10純凈版使用PowerShelll讓Cortana朗讀小說(shuō)的操作技巧

W10純凈版使用PowerShelll讓Cortana朗讀小說(shuō)的操作技巧

更新時(shí)間:2017-07-14 文章編輯:愛(ài)純凈 信息來(lái)源:網(wǎng)絡(luò) 閱讀次數(shù):
  W10純凈版如何使用PowerShelll讓Cortana朗讀小說(shuō)?Cortana是W10電腦的人工智能助手,可以幫忙處理一些基本任務(wù),比如日程安排、回答問(wèn)題等,其實(shí)Cortana還有更為強(qiáng)大的功能,比如讓Cortana為我們朗讀小說(shuō),這才不浪費(fèi)Cortana甜美的聲音嘛!下面給大家介紹W10純凈版使用PowerShelll讓Cortana朗讀小說(shuō)的操作技巧。

W10純凈版使用PowerShelll讓Cortana朗讀小說(shuō)的操作技巧

圖1:Cortana

W10純凈版使用PowerShelll讓Cortana朗讀小說(shuō)的操作技巧

圖2:來(lái)至微軟小娜的問(wèn)候

  W10純凈版如何使用PowerShelll讓Cortana朗讀小說(shuō)?

  1、把下面的代碼復(fù)制為.ps1文件保存好,打開(kāi)PowerShell(管理員),把執(zhí)行.ps1文件。當(dāng)然也可以復(fù)制之后直接執(zhí)行命令,都是一樣的效果。

  1. 01= "HKLM:/SOFTWARE/Microsoft/Speech_OneCore/Voices/Tokens/MSTTS_V110_zhCN_HongyuM"
  2. 02= "HKLM:/SOFTWARE/Microsoft/Speech_OneCore/Voices/Tokens/MSTTS_V110_zhCN_HongyuM/Attributes"
  3. 03= "HKLM:/SOFTWARE/Microsoft/Speech/Voices/Tokens/MSTTS_V110_zhCN_HongyuM"
  4. 04= "HKLM:/SOFTWARE/Microsoft/Speech/Voices/Tokens/MSTTS_V110_zhCN_HongyuM/Attributes"
  5. 05New-Item -Path ,,,
  6. 06New-ItemProperty -Path , -Name "(default)" -PropertyType string -Value "Microsoft Hongyu Mobile - Chinese (Simplified, PRC)"
  7. 07New-ItemProperty -Path , -Name LangDataPath -PropertyType string -Value "%windir%//Speech_OneCore//Engines//TTS//zh-CN//MSTTSLoczhCN.dat"
  8. 08New-ItemProperty -Path , -Name LangUpdateDataDirectory -PropertyType string -Value "%SystemDrive%//Data//SharedData//Speech_OneCore//Engines//TTS//zh-CN"
  9. 09New-ItemProperty -Path , -Name VoicePath -PropertyType string -Value "%windir%//Speech_OneCore//Engines//TTS//zh-CN//M2052Hongyu"
  10. 10New-ItemProperty -Path , -Name VoiceUpdateDataDirectory -PropertyType string -Value "%SystemDrive%//Data//SharedData//Speech_OneCore//Engines//TTS//zh-CN"
  11. 11New-ItemProperty -Path , -Name 804 -PropertyType string -Value "Microsoft Hongyu Mobile - Chinese (Simplified, PRC)"
  12. 12New-ItemProperty -Path , -Name CLSID -PropertyType string -Value "{179F3D56-1B0B-42B2-A962-59B7EF59FE1B}"
  13. 13New-ItemProperty -Path , -Name Version -PropertyType string -Value "11.0"
  14. 14New-ItemProperty -Path , -Name Language -PropertyType string -Value "804"
  15. 15New-ItemProperty -Path , -Name Gender -PropertyType string -Value "Female"
  16. 16New-ItemProperty -Path , -Name Age -PropertyType string -Value "Adult"
  17. 17New-ItemProperty -Path , -Name DataVersion -PropertyType string -Value "11.0.2013.1022"
  18. 18New-ItemProperty -Path , -Name SharedPronunciation -PropertyType string -Value ""
  19. 19New-ItemProperty -Path , -Name Name -PropertyType string -Value "Microsoft Hongyu Mobile"
  20. 20New-ItemProperty -Path , -Name Vendor -PropertyType string -Value "Microsoft"
  21. 21New-ItemProperty -Path , -Name PersonalAssistant -PropertyType string -Value "1"
復(fù)制代碼
= "HKLM:/SOFTWARE/Microsoft/Speech_OneCore/Voices/Tokens/MSTTS_V110_zhCN_HongyuM"= "HKLM:/SOFTWARE/Microsoft/Speech_OneCore/Voices/Tokens/MSTTS_V110_zhCN_HongyuM/Attributes"= "HKLM:/SOFTWARE/Microsoft/Speech/Voices/Tokens/MSTTS_V110_zhCN_HongyuM"= "HKLM:/SOFTWARE/Microsoft/Speech/Voices/Tokens/MSTTS_V110_zhCN_HongyuM/Attributes"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_OneCore//Engines//TTS//zh-CN//MSTTSLoczhCN.dat"New-ItemProperty -Path , -Name LangUpdateDataDirectory -PropertyType string -Value "%SystemDrive%//Data//SharedData//Speech_OneCore//Engines//TTS//zh-CN"New-ItemProperty -Path , -Name VoicePath -PropertyType string -Value "%windir%//Speech_OneCore//Engines//TTS//zh-CN//M2052Hongyu"New-ItemProperty -Path , -Name VoiceUpdateDataDirectory -PropertyType string -Value "%SystemDrive%//Data//SharedData//Speech_OneCore//Engines//TTS//zh-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、接下來(lái)打開(kāi)“控制面板”,找到“語(yǔ)音識(shí)別”,點(diǎn)擊左側(cè)窗口中的“文本到語(yǔ)音轉(zhuǎn)換”,在“語(yǔ)音選擇”框中選擇“Microsoft Hongyu Mobile - Chinese (Simplified, PRC)”,然后單擊確定按鈕,你就可以讓微軟小娜為你閱讀文本了。閱讀文本內(nèi)容可以使用帶有文本閱讀功能的文本編輯器,或者使用專(zhuān)門(mén)的小說(shuō)閱讀器,大家自己選一個(gè)自己喜歡的就行了。

W10純凈版使用PowerShelll讓Cortana朗讀小說(shuō)的操作技巧

圖3:選擇小娜的語(yǔ)音

  3、下面貼一段用PowerShell閱讀小說(shuō)的代碼,同樣保存為.ps1文件,然后在.ps1文件上右鍵,選擇“使用“使用PowerShell運(yùn)行”,之后把txt小說(shuō)拖到PowerShell窗口中,回車(chē),小娜就會(huì)自動(dòng)為你朗讀小說(shuō)了,再次回車(chē)就會(huì)退出朗讀!

  1. 01= Read-Host -Prompt "把小說(shuō)拖到此處并回車(chē)開(kāi)始朗讀"
  2. 02= New-Object -ComObject SAPI.SpVoice
  3. 03.Speak(,5)
  4. 04Read-Host -Prompt "回車(chē)退出朗讀"
復(fù)制代碼
= Read-Host -Prompt "把小說(shuō)拖到此處并回車(chē)開(kāi)始朗讀"= New-Object -ComObject SAPI.SpVoice.Speak(,5)Read-Host -Prompt "回車(chē)退出朗讀"

W10純凈版使用PowerShelll讓Cortana朗讀小說(shuō)的操作技巧

圖4:使用小娜朗讀小說(shuō)

  上述便是讓Cortana為我們朗讀小說(shuō)的操作方法,喜歡閱讀的伙伴,如果看書(shū)看累了,不妨讓小娜為您朗讀哦!

留言與評(píng)論(共有 條評(píng)論)
驗(yàn)證碼:

本類(lèi)最新列表

最熱系統(tǒng)下載