语音应用
简单的应用程序语音识别
添加的选项助手:语音:
const dictate = ( ) => {
recognition . start ( ) ;
recognition . onresult = ( event ) => {
const speechToText = event . results [ 0 ] [ 0 ] . transcript ;
paragraph . textContent = speechToText ;
if ( event . results [ 0 ] . isFinal ) {
if ( speechToText . includes ( 'what is the time' ) ) {
speak ( getTime ) ;
} ;
i