发现个好玩的 :bili_tv_dianzan:

const synth = window.speechSynthesis;

export const textToSpeech = (message: string) => {
  const msg = new SpeechSynthesisUtterance();

  msg.lang = 'zh-CN';
  msg.text = message;
  synth.speak(msg);
};

textToSpeech('我去你大爷');
Follow

:ac_classic01:

const synth = window.speechSynthesis;

const textToSpeech = (message) => {
  const msg = new SpeechSynthesisUtterance();

  msg.lang = 'zh-HK';
  msg.text = message;
  synth.speak(msg);
};

textToSpeech('扑街仔');
· · Web · 0 · 0 · 0
Sign in to participate in the conversation
小森林

每个人都有属于自己的一片森林,也许我们从来不曾走过,但它一直在那里,总会在那里。迷失的人迷失了,相逢的人会再相逢。愿这里,成为属于你的小森林。