Skip to content
This repository has been archived by the owner on May 23, 2023. It is now read-only.

How to voice to text? #106

Open
uldcra opened this issue Nov 10, 2019 · 0 comments
Open

How to voice to text? #106

uldcra opened this issue Nov 10, 2019 · 0 comments

Comments

@uldcra
Copy link

uldcra commented Nov 10, 2019

Hello everybody.
My english is awful.
I try to get the text capture when i am startinglistenig, but i d´ont know how to make it.

`this.speechRecognition.isRecognitionAvailable()
.then((available: boolean) => console.log(available))

// Start the recognition process
this.speechRecognition.startListening(options)
  .subscribe(
    (matches: string[]) => {
      console.log(matches);
      this.cd.detectChanges();
      for (let index = 0; index < matches.length; index++) {
        this.texto.push( matches[index] );
      }
      alert('Empezar a escuchar');
      this.cd.detectChanges();
    },
    (onerror) => {
      console.log('error:', onerror);
      alert('error' + JSON.stringify(onerror));
    }
  )`
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant