0.0.2 • Published 4 years ago

speech-services v0.0.2

Weekly downloads
8
License
-
Repository
-
Last release
4 years ago

SpeechServices

This library was generated with Angular CLI version 8.1.3.

Descripción

Esta librería se implementa sobre los servicios speech-recognition y text-to-speech de IONIC y que expone los siguientes servicios:

  • TextToSpeechService: este servicio expone los siguiente métodos:

    • Un método speak() que acepta como parámetros de entrada un texto y un locale, y devuelve un Promise \<any> que se resuelve cuando finalice la reproducción del texto.

    • Un método stopSpeaking() que detiene la locución en curso y devuelve Promise\<any>.

  • SpeechToTextService: este servicio expone los siguiente métodos:

    • Un método startListening() que acepta como parámetro de entrada un locale devuelve un Observable<string[]> que se resolverá cuando finalice la escucha. Esta promesa contendrá un array de strings con los textos identificados.

    • Un método stopListening() que detiene la escucha en curso y devuelve un Promise (sólo válido para iOS).

Requisitos

Para el empleo de esta librería es necesario disponer de los siguientes plugins en el proyecto al que se va a incorporar:

Los pasos para instalarlos son los siguientes:

  • ionic cordova plugin add cordova-plugin-tts
  • npm install @ionic-native/text-to-speech
  • ionic cordova plugin add cordova-plugin-speechrecognition
  • npm install @ionic-native/speech-recognition

Code scaffolding

Run ng generate component component-name --project speech-services to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module --project speech-services.

Note: Don't forget to add --project speech-services or else it will be added to the default project in your angular.json file.

Build

Run ng build speech-services to build the project. The build artifacts will be stored in the dist/ directory.

Publishing

After building your library with ng build speech-services, go to the dist folder cd dist/speech-services and run npm publish.

Running unit tests

Run ng test speech-services to execute the unit tests via Karma.

Further help

To get more help on the Angular CLI use ng help or go check out the Angular CLI README.

0.0.2

4 years ago

0.0.1

4 years ago