improvements

Post Reply
virtualmod
Site Admin
Posts: 2928
Joined: Wed Dec 11, 2019 8:31 am

improvements

Post by virtualmod »

I'll post everything related to website building and improvements here.
virtualmod
Site Admin
Posts: 2928
Joined: Wed Dec 11, 2019 8:31 am

Re: improvements

Post by virtualmod »

Speech recognition.
I want something like on this website
https://speechling.com/
I made a first simple prototype on my own, you can see how it may look like.
Mic
A text is shown. A user pronounce it, speech recognition convert it into text. Then he clicks Next to get a new phrase.
====================
1.It's possible to use webbrowser only.
A.Using webrtc and browser detection

webrtc
============
// hasWebRTC is undefined
// if .getUserMedia() (and its variants) is not available
var hasWebRTC = navigator.getUserMedia ||
navigator.webkitGetUserMedia ||
navigator.mozGetUserMedia ||
navigator.msGetUserMedia;

if (hasWebRTC) {
alert('This browser is fully or partially WebRTC-capable');
}
============
https://makitweb.com/demo/speechtext/
The pros:
easy to code
no need a dedicated webserver
The cons:
doesn't work for all webbrowsers, also recognition has very low quality, very often it's hanging. You have to test the program in many browsers include Internet Explorer to see if it works. Users with old Win XP-Win 7, old MacOs may not have all new feautures of html5 built in.So it will not work for them.
Developer cannot check what user pronounced and compare it with original, cannot save statistic.
Only user can define if it was pronounced good/bad or not.
I couldn't make it working.
B.Record voice and then play it.
Recorder.js to record wav/PCM audio directly in the browser. User can play recorded audio and browser will recognize it.
https://easy-english-study.com/recorder/
The pros:
Less hanging
work in almost all webbrowsers
The cons:
it records in all browsers but does recognition only in Google Chrome, again may not work for many old browsers
it asks access for microphone all time when user clicks Stop
Developer cannot check what user pronounced and compare it with original, cannot save statistic.
Only user can define if it was pronounced good/bad or not.
virtualmod
Site Admin
Posts: 2928
Joined: Wed Dec 11, 2019 8:31 am

Re: improvements

Post by virtualmod »

2.To use offline speech recognition
I have own webserver at home with ubuntu 20 server version installed.
I think to use vosk server
A.They have already made speech recognition server
A speech recognition server listen 2700 port, when there is voice it recognizes it
Source code here
https://github.com/alphacep/vosk-server
I tried to follow the installation manual
https://alphacephei.com/vosk/server
but got many errors
./test_microphone.py localhost:2700
alsa1.png
alsa1.png (53.68 KiB) Viewed 189 times
alsa2.png
alsa2.png (62 KiB) Viewed 189 times
alsa3.png
alsa3.png (13.95 KiB) Viewed 189 times
Post Reply