1

I am trying to figure out how I can get the pitch, rate and volume of my speech.

I am using the below code for speech to text:

function startDictation() {

  if (window.hasOwnProperty('webkitSpeechRecognition')) {

    var recognition = new webkitSpeechRecognition();

    recognition.continuous = false;
    recognition.interimResults = false;

    recognition.lang = "pt-BR";
    recognition.start();

    recognition.onresult = function(e) {
      document.getElementById('transcript').value
                               = e.results[0][0].transcript;
      recognition.stop();
      //document.getElementById('labnol').submit();
    };

     recognition.onerror = function(e) {
     recognition.stop();
    }

  }
}

Does someone know how I can get these informations of my speech? Or some alternative solution?

I really appreciate your help and atention. Thank you very much.

Helena

Nikolay Shmyrev
  • 24,897
  • 5
  • 43
  • 87
Helena
  • 741
  • 1
  • 6
  • 5

1 Answers1

0

I am trying to figure out how I can get the pitch, rate and volume of my speech.

It is not possible to do that with webkitSpeechRecognition. You have to write custom code for that, either in pure javascript or you can use emscripten to convert existing C libraries to extract things like pitch. You can check pocketsphinx.js for example.

Nikolay Shmyrev
  • 24,897
  • 5
  • 43
  • 87