-
Notifications
You must be signed in to change notification settings - Fork 8k
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
zh-cn: update the explanations within "Using the Web Speech API" #21832
Conversation
Preview URLs Flaws (18)URL:
External URLs (2)URL:
(comment last updated: 2024-07-06 07:54:55) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @AlphaHinex. I've left some comments on this PR :)
files/zh-cn/web/api/web_speech_api/using_the_web_speech_api/index.md
Outdated
Show resolved
Hide resolved
files/zh-cn/web/api/web_speech_api/using_the_web_speech_api/index.md
Outdated
Show resolved
Hide resolved
files/zh-cn/web/api/web_speech_api/using_the_web_speech_api/index.md
Outdated
Show resolved
Hide resolved
files/zh-cn/web/api/web_speech_api/using_the_web_speech_api/index.md
Outdated
Show resolved
Hide resolved
### 浏览器兼容性 | ||
|
||
Web Speech API 语音合成部分在各浏览器中还是在发展,还不成熟,现在有以下几个限制点: | ||
|
||
- Firefox 桌面版和移动版在 Gecko 42+(Windows)/44+ 支持,但是没有前缀,可以通过将`media.webspeech.synth.enabled`标志在`about:config`中转为`true`来启用。 | ||
- Firefox OS 2.5+ 支持,但是默认的,不需要任何权限。 | ||
- Chrome 桌面版和安卓版自 33 版以来都支持,但是没有前缀 | ||
[api.SpeechSynthesis](/zh-CN/docs/Web/API/Web_Speech_API#api.speechsynthesis) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I could not see this section in en-US, please remove it instead of updating it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed
files/zh-cn/web/api/web_speech_api/using_the_web_speech_api/index.md
Outdated
Show resolved
Hide resolved
files/zh-cn/web/api/web_speech_api/using_the_web_speech_api/index.md
Outdated
Show resolved
Hide resolved
早期版本的浏览器不支持 {{domxref("SpeechSynthesis.voiceschanged_event", "voiceschanged")}} 事件,只有当 {{domxref("SpeechSynthesis.getVoices()")}} 被触发时才返回语音列表。 | ||
而其他浏览器,比如 Chrome 中,你必须等待 `voiceschanged` 事件触发后才能获得可用语音列表。 | ||
为了兼容这两种情况,我们运行如下代码: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do not break lines, which will introduce spaces.
早期版本的浏览器不支持 {{domxref("SpeechSynthesis.voiceschanged_event", "voiceschanged")}} 事件,只有当 {{domxref("SpeechSynthesis.getVoices()")}} 被触发时才返回语音列表。 | |
而其他浏览器,比如 Chrome 中,你必须等待 `voiceschanged` 事件触发后才能获得可用语音列表。 | |
为了兼容这两种情况,我们运行如下代码: | |
早期版本的浏览器不支持 {{domxref("SpeechSynthesis.voiceschanged_event", "voiceschanged")}} 事件,只有当 {{domxref("SpeechSynthesis.getVoices()")}} 被触发时才返回语音列表。而其他浏览器,比如 Chrome 中,你必须等待 `voiceschanged` 事件触发后才能获得可用语音列表。为了兼容这两种情况,我们运行如下代码: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The English version looks good with multiple lines. Is there any possibility to remove the spaces from the rendering engine? Having all contents in one line makes the markdown file difficult to maintain.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, it is markdown spec for line breaks to introduce whitespace. Doing this is not correct.
files/zh-cn/web/api/web_speech_api/using_the_web_speech_api/index.md
Outdated
Show resolved
Hide resolved
files/zh-cn/web/api/web_speech_api/using_the_web_speech_api/index.md
Outdated
Show resolved
Hide resolved
Co-authored-by: A1lo <yin199909@aliyun.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @AlphaHinex. I'm a bit busy those days. Sorry for the delay.
Description
Update the explanation of
populateVoiceList
part and others.Motivation
Regarding the explanation of using the populateVoiceList function to fill in the list of available voices in different browsers, the previous Chinese version of the translation is still somewhat unclear. Therefore, an attempt is made to provide a clearer description of this part, and to synchronize some other details in the
Speech synthesis
section with the English version.Additional details
Related issues and pull requests