UNPKG

watson-developer-cloud

Version:
44 lines (43 loc) 2.02 kB
import RecognizeStream = require('../lib/recognize-stream'); import GeneratedSpeechToTextV1 = require('./v1-generated'); declare class SpeechToTextV1 extends GeneratedSpeechToTextV1 { static ERR_NO_CORPORA: string; static ERR_TIMEOUT: string; constructor(options: any); /** * Waits while corpora analysis status is 'being_processes', fires callback once the status is 'analyzed' * * Note: the code will throw an error in case there in no corpus in the customization * * * @param {Object} params The parameters * @param {String} params.customization_id - The GUID of the custom language model * @param {Number} [params.interval=5000] - (milliseconds) - how long to wait between status checks * @param {Number} [params.times=30] - maximum number of attempts * @param {Function} callback */ whenCorporaAnalyzed(params: any, callback: any): void; /** * Use the recognize function with a single 2-way stream over websockets * * @param {Object} params The parameters * @return {RecognizeStream} */ recognizeUsingWebSocket(params: any): RecognizeStream; recognize(params: any, callback: any): void | Promise<any>; /** * Waits while a customization status is 'pending' or 'training', fires callback once the status is 'ready' or 'available'. * * Note: the customization will remain in 'pending' status until at least one word corpus is added. * * See http://www.ibm.com/watson/developercloud/speech-to-text/api/v1/#list_models for status details. * * @param {Object} params The parameters * @param {String} params.customization_id - The GUID of the custom language model * @param {Number} [params.interval=5000] - (milliseconds) - how log to wait between status checks * @param {Number} [params.times=30] - maximum number of attempts * @param {Function} callback */ whenCustomizationReady(params: any, callback: any): void; } export = SpeechToTextV1;