Skip to content

Voice to Text Converter

sankeerthana1762 edited this page Sep 17, 2019 · 3 revisions

VOICE TO TEXT CONVERSION

This is a small Node.js API that returns random words upon request.

*Requirements

Node.js with npm

*Installation $ npm install

*Serve $ node server

*The concepts and tools learn about include:

Component communication in Angular JavaScript framework Managing streams with RxJS ReactiveX for JavaScript (packaged with Angular) Annyang library for Web API Speech Recognition Accessing a prebuilt Node API to generate random words

*Reactive Programming with RxJS and Observables "An observable is a stream that represents a collection over time."

*Web Speech API the lightweight Annyang JS library to work with speech recognition more easily in application. this is only supported in Chrome.

  • In index.html add the following link

     <script src="//cdnjs.cloudflare.com/ajax/libs/annyang/2.6.0/annyang.min.js"></script>
    

*import the module in app.module.ts

    import { SpeechService } from './speech.service';

*In service class import the following

   import { Injectable, NgZone } from '@angular/core';
   import { Subject } from 'rxjs/Subject';
  • declare the annyang variable with a type of any. This will prevent TypeScript errors.

     declare var annyang: any;
    

*refer this document for further understanding

   https://auth0.com/blog/rxjs-advanced-tutorial-with-angular-web-speech-part-1/
Clone this wiki locally