blob: 85173be32a5436f72ad95db6f96caae83fe13b76 [file] [log] [blame]
* Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
* for details. All rights reserved. Use of this source code is governed by a
* BSD-style license that can be found in the LICENSE file.
* @assertion
* @description This tests that we can get synthesizer voices on the Mac
import "dart:html";
import "../../../Utils/expect.dart";
import "../../../Utils/async_utils.dart";
void main() {
var speechSynthesis=window.speechSynthesis;
var list = speechSynthesis.getVoices();
var voice = list[0];
// Start a very short speaking job that will finish quickly.
var u = new SpeechSynthesisUtterance("this is a test string.");
u.voice = voice;
print("Verify that setting and retrieving the voice works.");
Expect.isTrue( ==;
u.onEnd.listen((event) {
print("Speech job finished successfully.");