Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

api.SpeechSynthesisUtterance.lang - Compatibility issue with Opera #25625

Open
DeepSideEffect opened this issue Jan 10, 2025 · 1 comment
Open
Labels
data:api Compat data for Web APIs. https://developer.mozilla.org/docs/Web/API

Comments

@DeepSideEffect
Copy link

What type of issue is this?

Browser bug (a bug with a feature that may impact site compatibility)

What information was incorrect, unhelpful, or incomplete?

The information about the incompatibility of the .lang property of SpeechSynthesisUtterance with Opera is correct.
For example, Opera does not respect the language setting, leading to incorrect pronunciation of English text based on the system's default language accent.

This issue disrupts the user experience, as it affects the clarity and accuracy of speech synthesis. This issue is not present in Chrome, Edge, and Firefox.

What browsers does this problem apply to, if applicable?

Chromium (Chrome, Edge 79+, Opera, Samsung Internet)

What did you expect to see?

I expected the .lang property of SpeechSynthesisUtterance to be fully compatible with Opera, similar to its compatibility with Chrome, Edge, and Firefox.

Specifically, I expected Opera to respect the language setting when specified, and correctly pronounce English text based on the specified language, without defaulting to the system's default language accent.

This would ensure a consistent and accurate speech synthesis experience across all major browsers.

Did you test this? If so, how?

I tested this issue on multiple browsers to compare the behavior of the .lang property of SpeechSynthesisUtterance. Here are the steps I followed:

  • Chrome: I set the .lang property to en-GB and tested the pronunciation of an English sentence. The pronunciation was correct, with a British English accent.

  • Edge: I repeated the same test as in Chrome, and the pronunciation was also correct, with a British English accent.

  • Opera: I set the .lang property to en-GB and tested the pronunciation. However, the pronunciation was incorrect, with a French accent, which is the default language setting of my system.

These tests confirmed that the issue is specific to Opera, as the .lang property is not respected, leading to incorrect pronunciation based on the system's default language accent.

Can you link to any release notes, bugs, pull requests, or MDN pages related to this?

MDN Web Docs - SpeechSynthesisUtterance: lang property: Browser compatibility

Do you have anything more you want to share?

You can test this issue directly and compare with any browser by clicking on the british flag (illustrated below) in the top left corner of the following page
image

MDN URL

https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesisUtterance/lang

MDN metadata

MDN page report details
  • Query: api.SpeechSynthesisUtterance.lang
  • Report started: 2025-01-10T09:50:44.395Z
@github-actions github-actions bot added the data:api Compat data for Web APIs. https://developer.mozilla.org/docs/Web/API label Jan 10, 2025
@DeepSideEffect
Copy link
Author

DeepSideEffect commented Jan 10, 2025

For more context and to see how this issue affects our project, see this related issue on our GitHub repository.

And I misunderstood the Browser compatibility section of the MDN documentation page at first.
It says not compatible for Opera Android, but should be compatible on Opera since v21 (Released 2014-05-06) --> Full support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
data:api Compat data for Web APIs. https://developer.mozilla.org/docs/Web/API
Projects
None yet
Development

No branches or pull requests

1 participant