nvaccess / nvda

NVDA, the free and open source Screen Reader for Microsoft Windows
https://www.nvaccess.org/
Other
2.09k stars 633 forks source link

Language switching not working properly for Chinese #8185

Closed Porges closed 6 years ago

Porges commented 6 years ago

Steps to reproduce:

  1. I have an HTML document that contains <span lang="zh">六子棋</span> (the outer text is marked lang="en".
  2. When I use an English voice as my main voice the Chinese comes out garbled in Chrome. In Edge it just says "Chinese letter" 3 times.
  3. When I use a Chinese voice then it is pronounced properly (aside from the numbers in the output, as reported in #8033).
  4. I tried a similar thing with French embedded in English, using an English voice as main, and it appears to be pronounced correctly in Chrome.

Expected behavior:

The text is pronounced properly.

Actual behavior:

The text is not pronounced properly.

System configuration:

NVDA version: 2018.1.1

NVDA Installed or portable: Installed.

Windows version: Windows 10 Version 10.0.17133 Build 17133

Name and version of other software in use when reproducing the issue: Tested in both Chrome ( 65.0.3325.181) & Edge.

Other questions:

Does the issue still occur after restarting your PC? Unknown

Have you tried any other versions of NVDA? No

josephsl commented 6 years ago

Hi, we’re missing an important puzzle piece: what synthesizer is this? Thanks.

From: George Pollard notifications@github.com Sent: Monday, April 16, 2018 8:39 PM To: nvaccess/nvda nvda@noreply.github.com Cc: Subscribed subscribed@noreply.github.com Subject: [nvaccess/nvda] Language switching not working properly for Chinese (#8185)

Steps to reproduce:

  1. I have an HTML document that contains 六子棋 (the outer text is marked lang="en".
  2. When I use an English voice as my main voice the Chinese comes out garbled.
  3. When I use a Chinese voice then it is pronounced properly (aside from the numbers in the output, as reported in #8033 https://github.com/nvaccess/nvda/issues/8033 ).
  4. I tried a similar thing with French embedded in English and it appears to be pronounced correctly.

Expected behavior:

The text is pronounced properly.

Actual behavior:

The text is not pronounced properly.

System configuration:

NVDA version: 2018.1

NVDA Installed or portable: Installed.

Windows version: Windows 10 Version 10.0.17133 Build 17133

Name and version of other software in use when reproducing the issue: Tested in both Chrome ( 65.0.3325.181) & Edge.

Other questions:

Does the issue still occur after restarting your PC? Unknown

Have you tried any other versions of NVDA? No

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/nvaccess/nvda/issues/8185 , or mute the thread https://github.com/notifications/unsubscribe-auth/AHgLkNp0ol0PQvOx3qb4ev947CPZqmDiks5tpWPigaJpZM4TXlfJ .

Porges commented 6 years ago

Sorry, the default one – I think espeak-ng?

Porges commented 6 years ago

Here is an example file (I put 3 Cantonese examples as I don't know what language tags NVDA/espeak is meant to recognize here):

<!DOCTYPE html>
<html lang="en">
    <head>
        <title>NVDA test</title>
    </head>
    <body>
        <p>Default Chinese example: <span lang="zh">六卒棋</span></p>
        <p>Cantonese example 1: <span lang="zh-HK">六卒棋</span></p>
        <p>Cantonese example 2: <span lang="zh-yue">六卒棋</span></p>
        <p>Cantonese example 3: <span lang="yue">六卒棋</span></p>
        <p>French example: <span lang="fr">Qu'est-ce que vous aimez faire pendant votre temps libre?</span></p>
    </body>
</html>
Porges commented 6 years ago

Here is a recording: Recording.zip

You can hear that the Chinese/Cantonese examples just make a strange noise. The French example works.

It should sound something like this (links to eSpeak testing page):

zstanecic commented 6 years ago

Hi, If it is the espeak NG, the cantonese voice in it is broken.

Wysłane z aplikacji Poczta dla Windows 10

Od: George Pollard Wysłano: вто́рникъ, 17 а҆прі́ллїа л. 2018. 06:32 Do: nvaccess/nvda DW: Subscribed Temat: Re: [nvaccess/nvda] Language switching not working properly forChinese (#8185)

Sorry, the default one – I think espeak-ng? — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

Porges commented 6 years ago

But also the voice I get with just "zh" is broken too?

josephsl commented 6 years ago

Hi, just to make sure: can you reproduce this with other synthesizers (such as Vocalizer, Windows OneCore voices, etc.)? If this is specific to Espeak NG, then I suggest asking Espeak folks to comment on this. Thanks.

From: George Pollard notifications@github.com Sent: Monday, April 16, 2018 11:22 PM To: nvaccess/nvda nvda@noreply.github.com Cc: Joseph Lee joseph.lee22590@gmail.com; Comment comment@noreply.github.com Subject: Re: [nvaccess/nvda] Language switching not working properly for Chinese (#8185)

But also the voice I get with just "zh" is broken too?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/nvaccess/nvda/issues/8185#issuecomment-381860383 , or mute the thread https://github.com/notifications/unsubscribe-auth/AHgLkPSVj0C6xitSj0a1z497iXRc-Bccks5tpYnugaJpZM4TXlfJ .

Porges commented 6 years ago

I haven't tried it with any others. The documentation says that eSpeak is the only synthesizer that supports language switching..

jiangtiandao commented 6 years ago

vocalizer supports language switching too some addon also support switching between two languages https://addons.nvda-project.org/addons/dualvoice.en.html @Porges

jiangtiandao commented 6 years ago

Default Chinese example and Cantonese example 1 works on next-15056 https://www.nvaccess.org/files/nvda/snapshots/ @Porges It seems that this issue has been fixed in dev version of espeak.

Porges commented 6 years ago

@jiangtiandao thanks, I confirmed it is working with 15056. 👍 (At least for the Mandarin ones.)

I have another question: I noticed that my example file isn't quite right – zh-HK gives the same pronunciation as zh, and yue or zh-yue don't make any noise. What data files do I need to install for Cantonese? I tried to copy in the zhy_dict from eSpeak-ng and that made it pronounce the examples as "letter letter letter", so I must still be missing something 🙂

jiangtiandao commented 6 years ago

Maybe auto language switching cannot detect Cantonese. You might need to set major voice to Cantonese to get that prouncation