chrome.ttsEngine shipped with Chrome is broken

497 views
Skip to first unread message

guest271314

unread,
Sep 5, 2022, 2:42:36 AM9/5/22
to Chromium-dev
Step to reproduce:

1. Open chrome-extension://neajdppkdcdipfabeoofebfddakdcjhd/_generated_background_page.html on a Tab;
2. On a different Tab run the following in DevTools console or Snippets 

speechSynthesis.cancel();
var recorder;

var text = `
1. XML parse: An XML parser is used to extract the document tree
and content from the incoming text document. The structure, tags
and attributes obtained in this step influence each of the following steps.

2. Structure analysis: The structure of a document influences the way
in which a document should be read. For example, there are common speaking
patterns associated with paragraphs and sentences.`;
var utterance = new SpeechSynthesisUtterance(text);
console.log(utterance);

utterance.onend = (e) => {
  console.log(e.type);
  recorder.stop();
}

utterance.onpause = (e) => {
  console.log(e.type);
}

utterance.onstart = async(e) => {
  console.log(e.type);
  speechSynthesis.pause();
  console.log(speechSynthesis.paused, speechSynthesis.speaking);
  stream = await navigator.mediaDevices.getDisplayMedia({audio: true, video: true,             echoCancellation: false,
            noiseSupression: false,
            autoGainControl: false,});
  [track] = stream.getAudioTracks();
  stream.removeTrack(stream.getVideoTracks()[0]);
  console.log(track);
  recorder = new MediaRecorder(stream);
  recorder.onstop = () => recorder.stream.getAudioTracks()[0].stop();
  recorder.ondataavailable = ({data}) => console.log(URL.createObjectURL(data));
  recorder.start();
  speechSynthesis.resume();
}
speechSynthesis.speak(utterance);

3. Select the extension background page at getDisplayMedia() prompt

What happens:

1. start event of SpeechSynthesisUtterance is fired twice; should be fired at most once;

2. speechSynthesis.pause() does not pause speech synthesis audio output;

3. Audio is output on the opened Tab and the background extension page; when chrome-extension://neajdppkdcdipfabeoofebfddakdcjhd/_generated_background_page.html are loaded on multiple tabs the audio will be output on each Tab.

4. When the calling Web page reloads the Google voice continues audio output on each Tab.

Lei Zhang

unread,
Sep 6, 2022, 2:32:13 AM9/6/22
to guest...@gmail.com, Chromium-dev
Please use crbug.com to report bugs.
> --
> --
> Chromium Developers mailing list: chromi...@chromium.org
> View archives, change email options, or unsubscribe:
> http://groups.google.com/a/chromium.org/group/chromium-dev
> ---
> You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.
> To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/729375a4-ab33-42e1-871d-eda6402e825en%40chromium.org.

guest271314

unread,
Sep 6, 2022, 11:31:27 AM9/6/22
to Lei Zhang, Chromium-dev
Your compatriots banned me from filing bugs there.

guest271314

unread,
Sep 7, 2022, 1:52:43 PM9/7/22
to Chromium-dev, guest271314, Chromium-dev, Lei Zhang
Reply all
Reply to author
Forward
0 new messages