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

Test SpeechSynthesisUtterance volume attribute #9963

Open
wants to merge 6 commits into
base: master
from

Conversation

Projects
None yet
4 participants
@guest271314
Copy link

guest271314 commented Mar 12, 2018

TODO: automate test to verify audio output of speechSynthesis.speak() using Web Audio API.

Test SpeechSynthesisUtterance volume attribute
TODO: automate test to verify audio output of speechSynthesis.speak() using Web Audio API.
@w3c-bots

This comment has been minimized.

Copy link

w3c-bots commented Mar 12, 2018

Build ERRORED

Started: 2018-03-12 02:50:28
Finished: 2018-03-12 02:56:35

Failing Jobs

  • lint
  • chrome:dev
  • safari:11.0
  • MicrosoftEdge:16.16299

View more information about this build on:

@guest271314

This comment has been minimized.

Copy link
Author

guest271314 commented Mar 16, 2018

@andrenatal @fleizach @gshires @jdsmith3000

What needs to be done to add this test to speech-api folder at this repository?

@guest271314

This comment has been minimized.

Copy link
Author

guest271314 commented May 28, 2018

@foolip Can this test be merged into the speech-api tests directory?

@foolip

This comment has been minimized.

Copy link
Contributor

foolip commented May 31, 2018

Please have a look at https://web-platform-tests.org/writing-tests/manual.html for some tips for manual tests, in particular the test needs to make it clear to the person running it what is passing and not. For example, you might try to utter the "FAIL" with volume 0, then the word "PASS" with volume 1, and instructions say that the test passes if you only hear the PASS.

@wpt-pr-bot wpt-pr-bot requested review from andrenatal, fleizach and gshires May 31, 2018

guest271314 added some commits Mar 20, 2019

Test HTMLMediaElement.captureStream()
Outputs expected result at Firefox. Crashes tab at Chromium/Chrome #15816
Merge pull request #2 from guest271314/guest271314-mediasource-htmlme…
…diaelement-capturestream

Test HTMLMediaElement.captureStream()
Merge pull request #3 from guest271314/revert-2-guest271314-mediasour…
…ce-htmlmediaelement-capturestream

Revert "Test HTMLMediaElement.captureStream()"
@foolip

This comment has been minimized.

Copy link
Contributor

foolip commented Mar 22, 2019

@guest271314 did you accidentally merge in more stuff to this PR? Did you have a look at https://web-platform-tests.org/writing-tests/manual.html? Sorry this has been sitting for so long, but it hasn't come up in my inbox because nothing happened until now.

@guest271314

This comment has been minimized.

Copy link
Author

guest271314 commented Mar 22, 2019

@foolip It took a few days to get this PR here. Did not intentionally include the Web Speech API .volume test, again; as there is already an open PR for that test. Would probably still not be here without the help of @jdm #15816 (comment).

Will try to not to state the issues at GitHub to prevent being banned here as well people tend to get emotional when talking to them without kid gloves on re their "platform"; and have already been redirected to some page that states "abuse" of the site by simply searching, after the recent acquisition of the site.

Does the test need to be written according to the linked manual test page? And then, does this PR need to be closed and a new PR opened? Can you provide the complete steps necessary for this PR to be incorporated into wpt, to avoid eventually filing another issue for the purpose of navigating this site and git process to get to that point?

@guest271314

This comment has been minimized.

Copy link
Author

guest271314 commented Mar 22, 2019

@foolip Does the manual test need to include buttons for both "PASS" and "FAIL"?

@foolip

This comment has been minimized.

Copy link
Contributor

foolip commented Apr 1, 2019

@guest271314 you don't need to have any buttons in the test itself, just instructions that are visible when opening the page that say what the user should do to judge whether it passes or not. Right now that's in JS comments, so putting the instructions in HTML would be good.

Other than that, you just need to get rid of the extra commits so that there's just one file remaining. If you don't want to deal with git rebase and would rather just edit the test in GitHub's UI, I can get rid of the extra file when merging instead.

@guest271314

This comment has been minimized.

Copy link
Author

guest271314 commented Apr 1, 2019

@foolip Is this appropriate?

<!DOCTYPE html>
<html>
<head>
  <title>5.2.3 SpeechSynthesisUtterance volume attribute test - manual</title>
  <script>
var text = "hello universe";
var volumes = [0, 0.16666666666666666, 0.3333333333333333, 0.5, 0.6666666666666666, 0.8333333333333333, 0.9999999999999999];
 window.speechSynthesis.cancel();
 function handleVoicesChanged() {
  volumes.forEach(function(volume) {
    var utterance = new SpeechSynthesisUtterance();
    utterance.text = "hello universe";  
    utterance.volume = volume;
    window.speechSynthesis.speak(utterance);
  });
};
window.speechSynthesis.onvoiceschanged = handleVoicesChanged;
window.speechSynthesis.getVoices();
</script>
</head>
<body>
<p>
Specification

https://w3c.github.io/speech-api/speechapi.html#utterance-attributes

volume attribute

This attribute specifies the speaking volume for the utterance. 
It ranges between 0 and 1 inclusive, with 0 being the lowest volume and 1 the highest volume, with a default of 1. 
If SSML is used, this value will be overridden by prosody tags in the markup.
</p>
<p>
Test

Does the volume of audio output change?
</p>
</body>
</html>

If so, what needs to be done? Place that HTML in own fork and make another PR? Or can the code in this PR be changed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.