SpeechRecognition+SpeechSynthesisUtterance实现鹦鹉学舌tom猫模仿你说话效果代码

代码语言:html

所属分类:其他

代码描述:SpeechRecognition+SpeechSynthesisUtterance实现鹦鹉学舌tom猫模仿你说话效果代码

代码标签: SpeechRecognition SpeechSynthesisUtterance 鹦鹉学舌 to

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">







    <style>
        body {
          font-family: system-ui;
          background: #f06d06;
          color: white;
          text-align: center;
        }
    </style>




</head>



<body>

    <button id="btn" onClick="recognition.start()">点击说话</button>



    <script>
        const btn = document.getElementById('btn');
        const SpeechRecognition = window.SpeechRecognition || window.webkitSpeechRecogn.........完整代码请登录后点击上方下载按钮下载查看

网友评论0