SpeechRecognition实现实时麦克风输入声音转文字效果代码
代码语言:html
所属分类:其他
代码描述:SpeechRecognition实现实时麦克风输入声音转文字效果代码
代码标签: SpeechRecognition 实时 麦克风 输入 声音 转 文字
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<style>
@import url("https://fonts.googleapis.com/css2?family=Quicksand:wght@300;400&display=swap");
body {
margin: 0;
padding: 0;
box-sizing: border-box;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
font-family: "Quicksand", sans-serif;
width: 100%;
height: 100vh;
background-color: #fafafa;
overflow: hidden;
}
h3 {
font-weight: 600;
color: #666;
font-size: 22px;
}
#accuracy {
font-weight: 400;
color: #777;
font-size: 16px;
}
.output-container {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
background-color: #fff;
border-radius: 15px;
margin: 3rem;
width: 40%;
position: absolute;
height: auto;
box-shadow: 0 6px 6px 0 rgb(0 0 0 / 0%), 0 6px 6px -2px rgb(0 0 0 / 12%),
0 2px 10px 0 rgb(0 0 0 / 9%);
}
.output-container #output {
text-align: center;
padding: 2rem;
}
.button {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
width: 50px;
height: 50px;
border-radius: 50%;
color: #fff;
background-color: #6cb1dd;
border: none;
margin: 3rem;
padding: 15px;
font-size: 18px;
font-weight: 200;
cursor: pointer;
outline: none;
letter-spacing: 1px;
transition: box-shadow 0.5s ease;
box-shadow: 0 6px 6px 0 rgb(0 0 0 / 0%), 0 6px 6px -2px rgb(0 0 0 / 12%),
0 2px 10px 0 rgb(0 0 0 / .........完整代码请登录后点击上方下载按钮下载查看
网友评论0