0

I am making a speech to text ASP.NET Core Web application that recognises Quranic/Classic Arabic using WebkitSpeechRecognition

For example: When I speak the word(i know how it is spoken) shown in the picture, I should get Quranic Arabic not Modern Arabic. At the moment only modern arabic is showing

So far, I have tried:

  1. All the Arabic accents here
  2. Had a look at Iqra and their approach(text to speech)is opposite to mine(speech to text)

Speech Recognition code:

function startConverting() {

            var finalTranscripts = '';
            var finalEnglish = '';
            //check if speech recogntion is supported by browser

            if ('webkitSpeechRecognition' in window) {
                var speechRecognizer = new webkitSpeechRecognition();
                speechRecognizer.continuous = true;
                speechRecognizer.interimResults = true;
                speechRecognizer.lang = 'ar-AE';
                speechRecognizer.start();


                speechRecognizer.onresult = function (event) {
                   // debugger;
                    var interimTranscripts = '';
                    for (var i = event.resultIndex; i < event.results.length; i++) {
                        var transcript = event.results[i][0].transcript;
                        if (event.results[i].isFinal) {
                            finalTranscripts += transcript;
                        } else {
                            interimTranscripts += transcript;
                        }
                    }

                    var test = finalTranscripts ? '' : interimTranscripts;

Is what I am trying to achieve even achievable. If yes, any pointers will be much appreciated. Thanks in advance.

stuartd
  • 70,509
  • 14
  • 132
  • 163
  • 1
    @stuartd, thanks for the edit. Your corrections will definitely help me improve – user9951936 Jan 04 '19 at 03:25
  • I am absolutely clueless about this language, but should `ar-AE` (arabic as spoken in Arab Emirates) get written using Quranic writing? Otherwise, do you know what should the language code for Quranic? Anyway, here is the list of languages supported by Chrome: https://cloud.google.com/speech-to-text/docs/languages – Kaiido Jan 04 '19 at 03:54
  • Thank you for your reply @Kaiido. I am clueless too. I have tried `ar-AE` too. All accents are giving the same output. I have cleared cache too but all in vain – user9951936 Jan 04 '19 at 04:58

1 Answers1

0

So, from having a look at the right(I looked at the wrong one initially) IQRA app, it seems that I don't need Classic Arabic recognised via speech. There is no language code for it. However, there is an algorithm(need to research) I need to use which will somehow match modern Arabic to classic one.

Thank you all for your input. Much appreciate it!