Mdn 有文档,可以查阅 地址

	let utterance = new SpeechSynthesisUtterance();
      utterance.text = '你好,世界!我是谁呀,你又是谁,春天在哪里呀,春天在哪里';
      utterance.lang = 'zh-CN';
      utterance.pitch = 1; // 音调为默认值(1)
      utterance.rate = 1; // 语速为正常速度(1)
      utterance.volume = 1; // 音量为最大值(1)
      window.speechSynthesis.speak(utterance);
Logo

技术共进,成长同行——讯飞AI开发者社区

更多推荐