Published
Edited
Mar 12, 2018
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
function speak(text, rate, array){
var utterThis = new window.SpeechSynthesisUtterance(text);
utterThis.voice = voices[voice];
utterThis.rate = rate;
let start, difference;
utterThis.onstart = function() { start = +new Date(); };
utterThis.onend = function() {
difference = +new Date() - start;
array.value = [...array.value, difference];
};
synth.speak(utterThis);
}
Insert cell
function countToTen(rate, array) {
array.value = [];
for (let i=0; i<10; i++) {
speak(i+1, rate, array);
}
}
Insert cell
synth = window.speechSynthesis
Insert cell
Insert cell
viewof normal_rate = new View([])
Insert cell
viewof adjustable_rate = new View([])
Insert cell
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more