机器人对话:一个WebGL演示,结合了来自网络浏览器的虚拟现实,语音识别和合成语音(仅适用于GoogleChrome)资源

   日期:2024-12-26    作者:zzzhengya2 移动:http://3jjewl.riyuangf.com/mobile/quote/28983.html
# Talk-to-the-Bot

机器人对话:一个WebGL演示,结合了来自网络浏览器的虚拟现实,语音识别和合成语音(仅适用于GoogleChrome)资源

A WebGL demo that combines virtual reality, speech recognition and synthetic voice from the web browser.<br/><br/> It shows a panorama picture that contains an interactive 3D model that allows the user to interact with voice commands and a VR interaction pointer. <strong>The app is configured to work in English and Spanish detecting the browser language automatically</strong>.<br/><br/> <strong>This demo currently works 100% only in Google Chrome and Google Chrome for Android</strong>. You'll find errors and issues with speech recognition in other browsers, and synthetic voice only works in Chrome as an experimental Javascript API.<br/><br/> <a href=https://download.csdn.net/download/weixin_42129412/"https://www.youtube.com/watch?v=tlX-FjS7eyg&feature=youtu.be&list=PLlmvyH9T-yztt_oK6M0UhlWLiiMHpnrO5" target="blank">I showed this demo in one of my three.js workshops in Spain ( IT STARTS ON 31:40 !!!! )</a> # Install and run - Download or clone the source files and run it in a local web server using Google Chrome or Google Chrome for Android.<br/> - <strong>When it runs from Android, the app will setup automatically for VR mode</strong>. Then tap the screen and the app will setup the browser window in fullscreen mode. You can use a Google Cardboard or any other third-party VR glasses to enjoy the experience. The screen will split in stereoscopic mode and you'll notice that the camera moves using the device's accelerometer. - Use the VR pointer ( using the mouse in desktop ) to interact with the small floating 3D robot. It will show you small text boxes at her side and the sythetic voice API will reproduce the text in Google Chrome. The speech sequence is started and stopped by pointing in or out of the robot. - When the robot asks for your name, Chrome will ask you about allow the microphone for the speech recognition. You must allow it in order to talk to the app. - Then... say your name! The speech commands are configured to say it in different ways ( "I am..." or "My name is..." ), and the synthetic voice will salute you using your given name. - Finally, if you say "Thanks" or "Thank you" after the salute, the robot will answer again. # Practical cases This is a very simple implementation of a sort of "VR bot". It can be taken to the next level using conversational platforms such as API.ai or any other information API using AJAX requests in Javascript. Replacing the synthetic voice with recorded audio would increase the quality of the final product. # Enabling Helper Mode Just modify this line in `js/main.js`: <pre>enableHelperMode(false);</pre> If you set it to `true`, it changes the three.js Perspective Camera properties and it shows a wireframed box that represents a "reference area" to place a 3D object in order to make it "credible" combined with the panorama sphere. It also shows a transparent box overlapping with the robot model. That's because the pointer of the Reticulum plugin only works pointing to three.js basic geometries. So any imported 3D object in the scene needs to be "wrapped" within an invisible box geometry that interacts with the pointer. # Implementation A list of the libraries and assets used for this demo: - WebGL implementation : <a href=https://download.csdn.net/download/weixin_42129412/"https://github.com/mrdoob/three.js/" target="blank">three.js r83 by Mr. Doob</a> - Stereoscopic view : <a href=https://download.csdn.net/download/weixin_42129412/"https://github.com/mrdoob/three.js/blob/73edfb8e72070da688517bdc1b34024ddfde8b08/examples/js/effects/StereoEffect.js" target="blank">StereoEffect.js for three.js by Mr. Doob</a> - Device Orientation Controls : <a href=https://download.csdn.net/download/weixin_42129412/"https://github.com/mrdoob/three.js/blob/6c7f000734f8579da37fb39e5c2e9e5e2dfb14f8/examples/js/controls/DeviceOrientationControls.jss" target="blank">DeviceOrientationControls.js for three.js by richt & WestLangley</a> - VR Pointer : <a href=https://download.csdn.net/download/weixin_42129412/"https://github.com/skezo/Reticulum" target="blank">Reticulum 2.0.2 by Skezo</a> - Speech recognition : <a href=https://download.csdn.net/download/weixin_42129412/"https://github.com/TalAter/annyang" target="blank">Annyang 2.4.0 by Tal Ater</a> - <a href=https://download.csdn.net/download/weixin_42129412/"https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesis" target="blank">SpeechSynthesis API in MDN</a> - three.js OBJLoader.js - THREEX dynamic texture extension by Jerome Etienne

特别提示:本信息由相关用户自行提供,真实性未证实,仅供参考。请谨慎采用,风险自负。


举报收藏 0评论 0
0相关评论
相关最新动态
推荐最新动态
点击排行
{
网站首页  |  关于我们  |  联系方式  |  使用协议  |  隐私政策  |  版权隐私  |  网站地图  |  排名推广  |  广告服务  |  积分换礼  |  网站留言  |  RSS订阅  |  违规举报  |  鄂ICP备2020018471号