diff --git a/src/@ionic-native/plugins/speech-recognition/index.ts b/src/@ionic-native/plugins/speech-recognition/index.ts index e3e265796..f9c1ea492 100644 --- a/src/@ionic-native/plugins/speech-recognition/index.ts +++ b/src/@ionic-native/plugins/speech-recognition/index.ts @@ -1,8 +1,10 @@ import { Injectable } from '@angular/core'; -import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core'; +import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core'; import { Observable } from 'rxjs/Observable'; -export type SpeechRecognitionListeningOptions = SpeechRecognitionListeningOptionsIOS | SpeechRecognitionListeningOptionsAndroid; +export type SpeechRecognitionListeningOptions = + | SpeechRecognitionListeningOptionsIOS + | SpeechRecognitionListeningOptionsAndroid; export interface SpeechRecognitionListeningOptionsIOS { /** @@ -41,6 +43,11 @@ export interface SpeechRecognitionListeningOptionsAndroid { * display listener popup window with prompt (default `true`) */ showPopup?: boolean; + + /** + * Allow partial results to be returned (default `false`) + */ + showPartial?: boolean; } /** @@ -101,7 +108,6 @@ export interface SpeechRecognitionListeningOptionsAndroid { }) @Injectable() export class SpeechRecognition extends IonicNativePlugin { - /** * Check feature available * @return {Promise} @@ -117,19 +123,18 @@ export class SpeechRecognition extends IonicNativePlugin { */ @Cordova({ callbackOrder: 'reverse', - observable: true, - + observable: true }) - startListening(options?: SpeechRecognitionListeningOptions): Observable> { + startListening( + options?: SpeechRecognitionListeningOptions + ): Observable> { return; } /** * Stop the recognition process */ - @Cordova({ - platforms: ['iOS'] - }) + @Cordova() stopListening(): Promise { return; } @@ -160,5 +165,4 @@ export class SpeechRecognition extends IonicNativePlugin { requestPermission(): Promise { return; } - }