Skip to content

OneCore 音声切り替え時のエラー #77

Closed

Description

@nishimotz

問題の再現手順:

音声設定で OneCore 音声を選ぶ

期待されること:

成功する

実際に起きること:

成功しない

システム構成:

NVDA 2018.1.1jp インストール環境
Windows 10 バージョン 1709

その他の質問:

WARNING - synthDriverHandler.SynthDriver.loadSettings (15:26:41.361):
Invalid voice: None
ERROR - synthDriverHandler.setSynth (15:26:41.424):
setSynth
Traceback (most recent call last):
  File "synthDriverHandler.pyo", line 91, in setSynth
  File "synthDriverHandler.pyo", line 500, in loadSettings
  File "synthDriverHandler.pyo", line 36, in changeVoice
  File "synthSettingsRing.pyo", line 143, in updateSupportedSettings
  File "synthSettingsRing.pyo", line 40, in __init__
  File "baseObject.pyo", line 21, in __get__
  File "synthDriverHandler.pyo", line 390, in _get_availableVoices
  File "synthDrivers\oneCore.pyo", line 245, in _getAvailableVoices
  File "synthDrivers\oneCore.pyo", line 257, in _isVoiceValid
UnicodeDecodeError: 'ascii' codec can't decode byte 0x8e in position 10: ordinal not in range(128)

Activity

  1. nishimotz commented on Apr 2, 2018

    @nishimotz
    MemberAuthor

    NVDA のバージョンをさかのぼっても解決しないこと、
    このエラーが出る Windows 10 環境とちゃんと OneCore が動く Windows 10 環境があること、
    などの理由から、Windows 環境のトラブルを疑い始めています。
    ですが、Windows 環境にトラブルがあった場合に NVDA 側でエラーメッセージの Unicode 処理がちゃんとできていない気はします。

  2. riku22 commented on Apr 2, 2018

    @riku22
    Contributor

     こちらでも同じ現象が起きており、近々報告しようと思っていたところです。
     こちらで確認した限りでは、インストール環境だと音声エンジンが正常に読み込まれず、ポータブル環境で「E:\nvda\」にインストールしたところ、エラーも出ず、うまく読み込まれました。
     また、インストール環境で設定のリセットやアドオンを無効化しての再起動等も試してみましたが、同じエラーが出るようです。
     なお、エラー内容は、ご報告のものと同じですので、勝手ながら省略させていただきます。

  3. nishimotz commented on Apr 2, 2018

    @nishimotz
    MemberAuthor

    報告ありがとうございます。
    NVDA の過去のバージョンと状況を比較しておられますか?

  4. riku22 commented on Apr 2, 2018

    @riku22
    Contributor

     こちらでは、Windows10 OneCore音声が搭載された2017.3JPの時点で、エラーが出て、読み込みできない状態でした。
     その後のバージョンでも同じような状況です。

  5. nishimotz commented on Apr 2, 2018

    @nishimotz
    MemberAuthor

    NVDA をインストールする場所が関係あるということは、もしかして 64ビット Windows でしか起こらない問題かも知れないですね。。どうでしょうか?

  6. riku22 commented on Apr 2, 2018

    @riku22
    Contributor

     こちらに32ビットのPCがないので、友人に検証してみてもらったところ、32ビットのPCでは正常に音声が読み込まれ、音声洗濯もできるようです。
     ということは、やはり64ビットなのが原因なんでしょうか。

  7. nishimotz commented on Apr 3, 2018

    @nishimotz
    MemberAuthor

    私が最初に報告した環境は 64 ビット Windows ですが、
    ポータブル版のフォルダ nvdajp を C ドライブの直下に作って起動すると、
    64 ビット Windows でも OneCore 音声を選択できました。

  8. nishimotz commented on Apr 3, 2018

    @nishimotz
    MemberAuthor

    本家 master をソースからビルドして確認。

    python source\nvda.pyw だと oneCore は正常。

    scons launcher して exe から実行すると下記のエラー。

    INFO - __main__ (08:14:14.369):
    Starting NVDA
    INFO - core.main (08:14:14.608):
    Config dir: C:\Users\nishimotz\AppData\Roaming\nvda
    INFO - config.ConfigManager._loadConfig (08:14:14.608):
    Loading config: C:\Users\nishimotz\AppData\Roaming\nvda\nvda.ini
    INFO - core.main (08:14:14.644):
    NVDA version source-master-4ccb2ab
    INFO - core.main (08:14:14.645):
    Using Windows version 10.0.16299 workstation
    INFO - core.main (08:14:14.645):
    Using Python version 2.7.14 (v2.7.14:84471935ed, Sep 16 2017, 20:19:30) [MSC v.1500 32 bit (Intel)]
    INFO - core.main (08:14:14.645):
    Using comtypes version 1.1.3
    INFO - synthDriverHandler.setSynth (08:14:15.190):
    Loaded synthDriver sapi5
    INFO - core.main (08:14:15.190):
    Using wx version 3.0.2.0 msw (classic)
    INFO - brailleInput.initialize (08:14:15.191):
    Braille input initialized
    INFO - braille.initialize (08:14:15.193):
    Using liblouis version 3.5.0
    INFO - braille.BrailleHandler.setDisplayByName (08:14:15.194):
    Loaded braille display driver noBraille, current display has 0 cells.
    INFO - _UIAHandler.UIAHandler.MTAThreadFunc (08:14:15.401):
    UIAutomation: IUIAutomation5
    
    INFO - core.main (08:14:16.719):
    NVDA initialized
    ERROR - synthDriverHandler.setSynth (08:14:32.086):
    setSynth
    Traceback (most recent call last):
      File "synthDriverHandler.pyc", line 87, in setSynth
      File "synthDrivers\oneCore.pyc", line 120, in __init__
      File "synthDrivers\oneCore.pyc", line 327, in _getDefaultVoice
      File "baseObject.pyc", line 21, in __get__
      File "synthDriverHandler.pyc", line 388, in _get_availableVoices
      File "synthDrivers\oneCore.pyc", line 259, in _getAvailableVoices
      File "synthDrivers\oneCore.pyc", line 280, in _isVoiceValid
    UnicodeDecodeError: 'ascii' codec can't decode byte 0x8e in position 10: ordinal not in range(128)
    INFO - synthDriverHandler.setSynth (08:14:32.118):
    Loaded synthDriver sapi5
    
  9. nishimotz commented on Apr 4, 2018

    @nishimotz
    MemberAuthor

    oneCore.py 280 行を直したら、後述の警告が出るが、
    正常に Ayumi が使えるようになった。

    DEBUGWARNING - synthDrivers.oneCore.SynthDriver._isVoiceValid (14:19:33.454):
    Could not open registry key u'HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Speech_OneCore\\Voices\\Tokens\\MSTTS_V110_enUS_DavidM', WindowsError(2, '\x8ew\x92\xe8\x82\xb3\x82\xea\x82\xbd\x83t\x83@\x83C\x83\x8b\x82\xaa\x8c\xa9\x82\xc2\x82\xa9\x82\xe8\x82\xdc\x82\xb9\x82\xf1\x81B')
    DEBUGWARNING - synthDrivers.oneCore.SynthDriver._isVoiceValid (14:19:33.454):
    Could not open registry key u'HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Speech_OneCore\\Voices\\Tokens\\MSTTS_V110_enUS_ZiraM', WindowsError(2, '\x8ew\x92\xe8\x82\xb3\x82\xea\x82\xbd\x83t\x83@\x83C\x83\x8b\x82\xaa\x8c\xa9\x82\xc2\x82\xa9\x82\xe8\x82\xdc\x82\xb9\x82\xf1\x81B')
    DEBUGWARNING - synthDrivers.oneCore.SynthDriver._isVoiceValid (14:19:33.456):
    Could not open registry key u'HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Speech_OneCore\\Voices\\Tokens\\MSTTS_V110_enUS_MarkM', WindowsError(2, '\x8ew\x92\xe8\x82\xb3\x82\xea\x82\xbd\x83t\x83@\x83C\x83\x8b\x82\xaa\x8c\xa9\x82\xc2\x82\xa9\x82\xe8\x82\xdc\x82\xb9\x82\xf1\x81B')
    DEBUG - speechDictHandler.SpeechDict.load (14:19:33.463):
    Loading speech dictionary 'C:\Users\nishimotz\AppData\Roaming\nvda\speechDicts\voiceDicts.v1\oneCore\oneCore-Microsoft Ayumi.dic'...
    DEBUG - speechDictHandler.SpeechDict.load (14:19:33.463):
    file 'C:\Users\nishimotz\AppData\Roaming\nvda\speechDicts\voiceDicts.v1\oneCore\oneCore-Microsoft Ayumi.dic' not found.
    INFO - synthDriverHandler.setSynth (14:19:33.463):
    Loaded synthDriver oneCore
    
    git diff master..
    diff --git a/source/synthDrivers/oneCore.py b/source/synthDrivers/oneCore.py
    index aeeb074d8..67dcdc967 100644
    --- a/source/synthDrivers/oneCore.py
    +++ b/source/synthDrivers/oneCore.py
    @@ -277,7 +277,7 @@ class SynthDriver(SynthDriver):
                    try:
                            hkey = _winreg.OpenKey(rootKey, subkey)
                    except WindowsError as e:
    -                       log.debugWarning("Could not open registry key %s, %s" % (ID, e))
    +                       log.debugWarning("Could not open registry key %r, %r" % (ID, e))
                            return False
                    try:
                            langDataPath = _winreg.QueryValueEx(hkey, 'langDataPath')
    
  10. nishimotz commented on Apr 4, 2018

    @nishimotz
    MemberAuthor

    本家にもこのエラーの報告があったのでコメントしました
    nvaccess/nvda#7673

  11. nishimotz commented on Apr 4, 2018

    @nishimotz
    MemberAuthor

    どうやら私の環境は「いちど Windows を英語化して、また日本語に戻して、なんらかの理由で英語の言語パックが消された状態」だったらしく、これが再現の条件だったと思われます。
    本家にプルリクエスト (8141) を提案中です。

  12. added a commit that references this issue on Apr 5, 2018
  13. added this to the 2018.2jp milestone on Apr 5, 2018
  14. nishimotz commented on Apr 5, 2018

    @nishimotz
    MemberAuthor

    本家にプルリクエストした変更を 2018.2jp-beta-180405j に取り込みました。

  15. riku22 commented on Apr 5, 2018

    @riku22
    Contributor

     ありがとうございます。
     先ほど細心のベータ版2018.2jp-beta-180405jで、OneCore音声が正常に利用できることを確認しました。

  16. modified the milestones: 2018.2jp, 2018.2 on Apr 20, 2018
  17. nishimotz commented on Apr 20, 2018

    @nishimotz
    MemberAuthor

    本家 master にもマージされました。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions