chrome Web Speech API实现全球语言转文字效果代码
代码语言:html
所属分类:多媒体
代码描述:chrome Web Speech API实现全球语言转文字效果代码,主要需要您的网络能够访问google服务
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<html>
<head>
<meta charset='utf-8'>
<meta http-equiv='X-UA-Compatible' content='IE=edge'>
<title>Web Speech APIU</title>
<meta name='viewport' content='width=device-width, initial-scale=1'>
<link type="text/css" rel="stylesheet" href="//repo.bfw.wiki/bfwrepo/css/bootstrap.4.3.1.min.css">
<style>
#info a {
color: darkred;
text-decoration: underline;
}
.final {
color: black;
padding-right: 3px;
}
.interim {
color: gray;
}
#results {
font-size: 14px;
font-weight: bold;
border: 1px solid #ddd;
padding: 15px;
text-align: left;
min-height: 150px;
margin: 0 0 20px 0;
}
#start_button {
border: 0;
background-color: transparent;
padding: 0;
cursor: pointer;
}
#start_img {
width: 50px;
height: 50px;
}
.btn-primary {
width: 100px;
margin: auto;
}
select {
padding: 5px 5px;
}
@media screen and (max-width: 767px) {
#select_dialect {
position: absolute;
right: 0;
}
}
@media screen and (min-width: 768px) {
select {
margin-right: 10px;
}
}
</style>
<script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/jquery-3.2.1.min.js"></script>
</head>
<body>
.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0