Watson Developer Cloud Unity SDK
1.0.0
The Unity SDK uses the Watson Developer Cloud services, a collection of REST APIs and SDKs that use cognitive computing to solve complex problems.
|
This class wraps the Watson Speech to Text service. Speech to Text Service More...
Public Member Functions | |
delegate void | ErrorEvent (string error) |
This callback is used to return errors through the OnError property. More... | |
delegate byte[] | LoadFileDelegate (string filename) |
The delegate for loading a file. More... | |
SpeechToText (Credentials credentials) | |
delegate void | OnGetModels (ModelSet models, string customData) |
This callback object is used by the GetModels() method. More... | |
bool | GetModels (OnGetModels callback, string customData=default(string)) |
This function retrieves all the language models that the user may use by setting the RecognizeModel public property. More... | |
delegate void | OnGetModel (Model model, string customData) |
This callback object is used by the GetModel() method. More... | |
bool | GetModel (OnGetModel callback, string modelID, string customData=default(string)) |
This function retrieves a specified languageModel. More... | |
delegate void | OnRecognize (SpeechRecognitionEvent results) |
This callback object is used by the Recognize() and StartListening() methods. More... | |
bool | StartListening (OnRecognize callback) |
This starts the service listening and it will invoke the callback for any recognized speech. OnListen() must be called by the user to queue audio data to send to the service. StopListening() should be called when you want to stop listening. More... | |
void | OnListen (AudioData clip) |
This function should be invoked with the AudioData input after StartListening() method has been invoked. The user should continue to invoke this function until they are ready to call StopListening(), typically microphone input is sent to this function. More... | |
bool | StopListening () |
Invoke this function stop this service from listening. More... | |
bool | Recognize (AudioClip clip, OnRecognize callback) |
This function POSTs the given audio clip the recognize function and convert speech into text. This function should be used only on AudioClips under 4MB once they have been converted into WAV format. Use the StartListening() for continuous recognition of text. More... | |
delegate void | GetCustomizationsCallback (Customizations customizations, string customData) |
This callback is used by the GetCustomizations() function. More... | |
bool | GetCustomizations (GetCustomizationsCallback callback, string language="en-US", string customData=default(string)) |
Lists information about all custom language models that are owned by the calling user. Use the language query parameter to see all custom models for the specified language; omit the parameter to see all custom models for all languages. Note: This method is currently a beta release that is available for US English only. More... | |
delegate void | CreateCustomizationCallback (CustomizationID customizationID, string customData) |
Thid callback is used by the CreateCustomization() function. More... | |
bool | CreateCustomization (CreateCustomizationCallback callback, string name, string base_model_name="en-US_BroadbandModel", string description=default(string), string customData=default(string)) |
Creates a new custom language model for a specified base language model. The custom language model can be used only with the base language model for which it is created. The new model is owned by the individual whose service credentials are used to create it. Note: This method is currently a beta release that is available for US English only. More... | |
delegate void | OnDeleteCustomizationCallback (bool success, string customData) |
This callback is used by the DeleteCustomization() function. More... | |
bool | DeleteCustomization (OnDeleteCustomizationCallback callback, string customizationID, string customData=default(string)) |
Deletes an existing custom language model. Only the owner of a custom model can use this method to delete the model. Note: This method is currently a beta release that is available for US English only. More... | |
delegate void | GetCustomizationCallback (Customization customization, string customData) |
This callback is used by the GetCusomization() function. More... | |
bool | GetCustomization (GetCustomizationCallback callback, string customizationID, string customData=default(string)) |
Lists information about a custom language model. Only the owner of a custom model can use this method to query information about the model. Note: This method is currently a beta release that is available for US English only. More... | |
delegate void | TrainCustomizationCallback (bool success, string customData) |
This callback is used by the TrainCustomization() function. More... | |
bool | TrainCustomization (TrainCustomizationCallback callback, string customizationID, string wordTypeToAdd=WordTypeToAdd.All, string customData=default(string)) |
Initiates the training of a custom language model with new corpora, words, or both.After adding training data to the custom model with the corpora or words methods, use this method to begin the actual training of the model on the new data.You can specify whether the custom model is to be trained with all words from its words resources or only with words that were added or modified by the user.Only the owner of a custom model can use this method to train the model. This method is asynchronous and can take on the order of minutes to complete depending on the amount of data on which the service is being trained and the current load on the service.The method returns an HTTP 200 response code to indicate that the training process has begun. You can monitor the status of the training by using the GET /v1/customizations/{customization_id} method to poll the model's status. Use a loop to check the status every 10 seconds. The method returns a Customization object that includes status and progress fields. A status of available means that the custom model is trained and ready to use. If training is in progress, the progress field indicates the progress of the training as a percentage complete. Note: For this beta release, the progress field does not reflect the current progress of the training. The field changes from 0 to 100 when training is complete. Training can fail to start for the following reasons: No training data (corpora or words) have been added to the custom model. Pre-processing of corpora to generate a list of out-of-vocabulary (OOV) words is not complete. Pre-processing of words to validate or auto-generate sounds-like pronunciations is not complete. One or more words that were added to the custom model have invalid sounds-like pronunciations that you must fix. Note: This method is currently a beta release that is available for US English only. More... | |
delegate void | ResetCustomizationCallback (bool success, string customData) |
This callback is used by the ResetCustomization() function. More... | |
bool | ResetCustomization (ResetCustomizationCallback callback, string customizationID, string customData=default(string)) |
Resets a custom language model by removing all corpora and words from the model.Resetting a custom model initializes the model to its state when it was first created. Metadata such as the name and language of the model are preserved.Only the owner of a custom model can use this method to reset the model. Note: This method is currently a beta release that is available for US English only. More... | |
delegate void | UpgradeCustomizationCallback (bool success, string customData) |
This callback is used by the UpgradeCustomization() function. More... | |
bool | UpgradeCustomization (UpgradeCustomizationCallback callback, string customizationID, string customData=default(string)) |
Upgrades a custom language model to the latest release level of the Speech to Text service. The method bases the upgrade on the latest trained data stored for the custom model. If the corpora or words for the model have changed since the model was last trained, you must use the POST /v1/customizations/{customization_id}/train method to train the model on the new data. Only the owner of a custom model can use this method to upgrade the model. Note: This method is not currently implemented.It will be added for a future release of the API. More... | |
delegate void | GetCustomCorporaCallback (Corpora corpora, string customData) |
This callback is used by the GetCustomCorpora() function. More... | |
bool | GetCustomCorpora (GetCustomCorporaCallback callback, string customizationID, string customData=default(string)) |
Lists information about all corpora that have been added to the specified custom language model. The information includes the total number of words and out-of-vocabulary (OOV) words, name, and status of each corpus. Only the owner of a custom model can use this method to list the model's corpora. Note: This method is currently a beta release that is available for US English only. More... | |
delegate void | GetCustomCorpusCallback (Corpus corpus, string customData) |
This callback is used by the GetCustomCorpus() function. More... | |
bool | GetCustomCorpus (GetCustomCorpusCallback callback, string customizationID, string corpusName, string customData=default(string)) |
Lists information about all corpora that have been added to the specified custom language model. The information includes the total number of words and out-of-vocabulary (OOV) words, name, and status of each corpus. Only the owner of a custom model can use this method to list the model's corpora. Note: This method is currently a beta release that is available for US English only. More... | |
delegate void | OnDeleteCustomCorpusCallback (bool success, string customData) |
This callback is used by the DeleteCustomCorpus() function. More... | |
bool | DeleteCustomCorpus (OnDeleteCustomCorpusCallback callback, string customizationID, string corpusName, string customData=default(string)) |
Deletes an existing corpus from a custom language model. The service removes any out-of-vocabulary (OOV) words associated with the corpus from the custom model's words resource unless they were also added by another corpus or they have been modified in some way with the POST /v1/customizations/{customization_id}/words or PUT /v1/customizations/{customization_id}/words/{word_name} method. Removing a corpus does not affect the custom model until you train the model with the POST /v1/customizations/{customization_id}/train method. Only the owner of a custom model can use this method to delete a corpus from the model. Note: This method is currently a beta release that is available for US English only. More... | |
delegate void | OnAddCustomCorpusCallback (bool success, string customData) |
This callback is used by the AddCustomCorpus() function. More... | |
bool | AddCustomCorpus (OnAddCustomCorpusCallback callback, string customizationID, string corpusName, bool allowOverwrite, string trainingPath, string customData=default(string)) |
Adds a single corpus text file of new training data to the custom language model. Use multiple requests to submit multiple corpus text files. Only the owner of a custom model can use this method to add a corpus to the model. Submit a plain text file that contains sample sentences from the domain of interest to enable the service to extract words in context.The more sentences you add that represent the context in which speakers use words from the domain, the better the service's recognition accuracy. Adding a corpus does not affect the custom model until you train the model for the new data by using the POST /v1/customizations/{customization_id}/train method. Use the following guidelines to prepare a corpus text file: More... | |
bool | AddCustomCorpus (OnAddCustomCorpusCallback callback, string customizationID, string corpusName, bool allowOverwrite, byte[] trainingData, string customData=default(string)) |
Overload method for AddCustomCorpus that takes byteArray training data. More... | |
delegate void | GetCustomWordsCallback (WordsList wordList, string customData) |
This callback is used by the GetCustomWords() function. More... | |
bool | GetCustomWords (GetCustomWordsCallback callback, string customizationID, string wordType=WordType.All, string customData=default(string)) |
Lists information about all custom words from a custom language model. You can list all words from the custom model's words resource, only custom words that were added or modified by the user, or only OOV words that were extracted from corpora. Only the owner of a custom model can use this method to query the words from the model. Note: This method is currently a beta release that is available for US English only. More... | |
delegate void | AddCustomWordsCallback (bool success, string customData) |
This callback is used by the AddCustomWords() function. More... | |
bool | AddCustomWords (AddCustomWordsCallback callback, string customizationID, bool useDataPath, string wordsJsonPath, string customData=default(string)) |
Adds one or more custom words to a custom language model.The service populates the words resource for a custom model with out-of-vocabulary(OOV) words found in each corpus added to the model.You can use this method to add additional words or to modify existing words in the words resource.Only the owner of a custom model can use this method to add or modify custom words associated with the model.Adding or modifying custom words does not affect the custom model until you train the model for the new data by using the POST /v1/customizations/{customization_id}/train method. You add custom words by providing a Words object, which is an array of Word objects, one per word.You must use the object's word parameter to identify the word that is to be added. You can also provide one or both of the optional sounds_like and display_as fields for each word. The sounds_like field provides an array of one or more pronunciations for the word. Use the parameter to specify how the word can be pronounced by users.Use the parameter for words that are difficult to pronounce, foreign words, acronyms, and so on.For example, you might specify that the word IEEE can sound like i triple e.You can specify a maximum of five sounds-like pronunciations for a word, and each pronunciation must adhere to the following rules: Use English alphabetic characters: a-z and A-Z. To pronounce a single letter, use the letter followed by a period, for example, N.C.A.A. for the word NCAA. Use real or made-up words that are pronounceable in the native language, for example, shuchensnie for the word Sczcesny. Substitute equivalent English letters for non-English letters, for example, s for ç or ny for ñ. Substitute non-accented letters for accented letters, for example a for à or e for è. Use the spelling of numbers, for example, seventy-five for 75. You can include multiple words separated by spaces, but the service enforces a maximum of 40 total characters not including spaces. The display_as field provides a different way of spelling the word in a transcript. Use the parameter when you want the word to appear different from its usual representation or from its spelling in corpora training data.For example, you might indicate that the word IBM(trademark) is to be displayed as IBM™. If you add a custom word that already exists in the words resource for the custom model, the new definition overrides the existing data for the word.If the service encounters an error with the input data, it returns a failure code and does not add any of the words to the words resource. The call returns an HTTP 201 response code if the input data is valid.It then asynchronously pre-processes the words to add them to the model's words resource. The time that it takes for the analysis to complete depends on the number of new words that you add but is generally faster than adding a corpus or training a model. You can use the GET /v1/customizations/{ customization_id}/words or GET /v1/customizations/{customization_id}/words/{word_name} method to review the words that you add.Words with an invalid sounds_like field include an error field that describes the problem.You can use other words methods to correct errors, eliminate typos, and modify how words are pronounced as needed. Note: This method is currently a beta release that is available for US English only. More... | |
bool | AddCustomWords (AddCustomWordsCallback callback, string customizationID, Words words, string customData=default(string)) |
bool | AddCustomWords (AddCustomWordsCallback callback, string customizationID, string wordsJson, string customData=default(string)) |
delegate void | OnDeleteCustomWordCallback (bool success, string customData) |
This callback is used by the DeleteCustomWord() function. More... | |
bool | DeleteCustomWord (OnDeleteCustomWordCallback callback, string customizationID, string word, string customData=default(string)) |
Deletes a custom word from a custom language model. You can remove any word that you added to the custom model's words resource via any means. However, if the word also exists in the service's base vocabulary, the service removes only the custom pronunciation for the word; the word remains in the base vocabulary. Removing a custom word does not affect the custom model until you train the model with the POST /v1/customizations/{customization_id}/train method.Only the owner of a custom model can use this method to delete a word from the model. Note: This method is currently a beta release that is available for US English only. More... | |
delegate void | GetCustomWordCallback (WordData word, string customData) |
This callback is used by the GetCustomWord() function. More... | |
bool | GetCustomWord (GetCustomWordCallback callback, string customizationID, string word, string customData=default(string)) |
Lists information about a custom word from a custom language model. Only the owner of a custom model can use this method to query a word from the model. Note: This method is currently a beta release that is available for US English only. More... | |
string | GetServiceID () |
<exclude> More... | |
Properties | |
LoadFileDelegate | LoadFile [get, set] |
Set this property to overload the internal file loading of this class. More... | |
bool | IsListening [get] |
True if StartListening() has been called. More... | |
bool | AudioSent [get] |
True if AudioData has been sent and we are recognizing speech. More... | |
ErrorEvent | OnError [get, set] |
This delegate is invoked when an error occurs. More... | |
string | RecognizeModel [get, set] |
This property controls which recognize model we use when making recognize requests of the server. More... | |
int | MaxAlternatives [get, set] |
Returns the maximum number of alternatives returned by recognize. More... | |
bool | EnableTimestamps [get, set] |
True to return timestamps of words with results. More... | |
bool | EnableWordConfidence [get, set] |
True to return word confidence with results. More... | |
bool | EnableContinousRecognition [get, set] |
If true, then we will try to continuously recognize speech. More... | |
bool | EnableInterimResults [get, set] |
If true, then we will get interim results while recognizing. The user will then need to check the Final flag on the results. More... | |
bool | DetectSilence [get, set] |
If true, then we will try not to send silent audio clips to the server. This can save bandwidth when no sound is happening. More... | |
float | SilenceThreshold [get, set] |
A value from 1.0 to 0.0 that determines what is considered silence. If the audio level is below this value then we consider it silence. More... | |
string | Url [get, set] |
Gets and sets the endpoint URL for the service. More... | |
Credentials | Credentials [get, set] |
Gets and sets the credentials of the service. Replace the default endpoint if endpoint is defined. More... | |
string[] | Keywords [get, set] |
NON-MULTIPART ONLY: Array of keyword strings to spot in the audio. Each keyword string can include one or more tokens. Keywords are spotted only in the final hypothesis, not in interim results. Omit the parameter or specify an empty array if you do not need to spot keywords. More... | |
float | KeywordsThreshold [get, set] |
NON-MULTIPART ONLY: Confidence value that is the lower bound for spotting a keyword. A word is considered to match a keyword if its confidence is greater than or equal to the threshold. Specify a probability between 0 and 1 inclusive. No keyword spotting is performed if you omit the parameter. If you specify a threshold, you must also specify one or more keywords. More... | |
float | WordAlternativesThreshold [get, set] |
NON-MULTIPART ONLY: Confidence value that is the lower bound for identifying a hypothesis as a possible word alternative (also known as "Confusion Networks"). An alternative word is considered if its confidence is greater than or equal to the threshold. Specify a probability between 0 and 1 inclusive. No alternative words are computed if you omit the parameter. More... | |
bool | ProfanityFilter [get, set] |
NON-MULTIPART ONLY: If true (the default), filters profanity from all output except for keyword results by replacing inappropriate words with a series of asterisks. Set the parameter to false to return results with no censoring. Applies to US English transcription only. More... | |
bool | SmallFormatting [get, set] |
NON-MULTIPART ONLY: If true, converts dates, times, series of digits and numbers, phone numbers, currency values, and Internet addresses into more readable, conventional representations in the final transcript of a recognition request. If false (the default), no formatting is performed. Applies to US English transcription only. More... | |
bool | SpeakerLabels [get, set] |
NON-MULTIPART ONLY: Indicates whether labels that identify which words were spoken by which participants in a multi-person exchange are to be included in the response. If true, speaker labels are returned; if false (the default), they are not. Speaker labels can be returned only for the following language models: en-US_NarrowbandModel, en-US_BroadbandModel, es-ES_NarrowbandModel, es-ES_BroadbandModel, ja-JP_NarrowbandModel, and ja-JP_BroadbandModel. Setting speaker_labels to true forces the timestamps parameter to be true, regardless of whether you specify false for the parameter. More... | |
This class wraps the Watson Speech to Text service. Speech to Text Service
|
inline |
|
inline |
Adds a single corpus text file of new training data to the custom language model. Use multiple requests to submit multiple corpus text files. Only the owner of a custom model can use this method to add a corpus to the model. Submit a plain text file that contains sample sentences from the domain of interest to enable the service to extract words in context.The more sentences you add that represent the context in which speakers use words from the domain, the better the service's recognition accuracy. Adding a corpus does not affect the custom model until you train the model for the new data by using the POST /v1/customizations/{customization_id}/train method. Use the following guidelines to prepare a corpus text file:
The call returns an HTTP 201 response code if the corpus is valid.It then asynchronously pre-processes the contents of the corpus and automatically extracts new words that it finds.This can take on the order of a minute or two to complete depending on the total number of words and the number of new words in the corpus, as well as the current load on the service.You cannot submit requests to add additional corpora or words to the custom model, or to train the model, until the service's analysis of the corpus for the current request completes. Use the GET /v1/customizations/{customization_id}/corpora method to check the status of the analysis.
The service auto-populates the model's words resource with any word that is not found in its base vocabulary; these are referred to as out-of-vocabulary (OOV) words. You can use the GET /v1/customizations/{customization_id}/words method to examine the words resource, using other words method to eliminate typos and modify how words are pronounced as needed.
To add a corpus file that has the same name as an existing corpus, set the allow_overwrite query parameter to true; otherwise, the request fails.Overwriting an existing corpus causes the service to process the corpus text file and extract OOV words anew.Before doing so, it removes any OOV words associated with the existing corpus from the model's words resource unless they were also added by another corpus or they have been modified in some way with the POST /v1/customizations/{customization_id}/words or PUT /v1/customizations/{customization_id}/words/{word_name} method.
The service limits the overall amount of data that you can add to a custom model to a maximum of 10 million total words from all corpora combined.Also, you can add no more than 30 thousand new words to a model; this includes words that the service extracts from corpora and words that you add directly. Note: This method is currently a beta release that is available for US English only
callback | The callback. |
customizationID | The customization ID with the corpus to be deleted. |
corpusName | The corpus name to be deleted. |
allowOverwrite | Allow overwriting of corpus data. |
trainingData | A file path to plain text training data. |
customData | Optional customization data. |
|
inline |
Overload method for AddCustomCorpus that takes byteArray training data.
callback | The callback. |
customizationID | The customization ID with the corpus to be deleted. |
corpusName | The corpus name to be deleted. |
allowOverwrite | Allow overwriting of corpus data. |
trainingData | ByteArray data for training data. |
customData | Optional customization data. |
|
inline |
Adds one or more custom words to a custom language model.The service populates the words resource for a custom model with out-of-vocabulary(OOV) words found in each corpus added to the model.You can use this method to add additional words or to modify existing words in the words resource.Only the owner of a custom model can use this method to add or modify custom words associated with the model.Adding or modifying custom words does not affect the custom model until you train the model for the new data by using the POST /v1/customizations/{customization_id}/train method. You add custom words by providing a Words object, which is an array of Word objects, one per word.You must use the object's word parameter to identify the word that is to be added. You can also provide one or both of the optional sounds_like and display_as fields for each word. The sounds_like field provides an array of one or more pronunciations for the word. Use the parameter to specify how the word can be pronounced by users.Use the parameter for words that are difficult to pronounce, foreign words, acronyms, and so on.For example, you might specify that the word IEEE can sound like i triple e.You can specify a maximum of five sounds-like pronunciations for a word, and each pronunciation must adhere to the following rules: Use English alphabetic characters: a-z and A-Z. To pronounce a single letter, use the letter followed by a period, for example, N.C.A.A. for the word NCAA. Use real or made-up words that are pronounceable in the native language, for example, shuchensnie for the word Sczcesny. Substitute equivalent English letters for non-English letters, for example, s for ç or ny for ñ. Substitute non-accented letters for accented letters, for example a for à or e for è. Use the spelling of numbers, for example, seventy-five for 75. You can include multiple words separated by spaces, but the service enforces a maximum of 40 total characters not including spaces. The display_as field provides a different way of spelling the word in a transcript. Use the parameter when you want the word to appear different from its usual representation or from its spelling in corpora training data.For example, you might indicate that the word IBM(trademark) is to be displayed as IBM™. If you add a custom word that already exists in the words resource for the custom model, the new definition overrides the existing data for the word.If the service encounters an error with the input data, it returns a failure code and does not add any of the words to the words resource. The call returns an HTTP 201 response code if the input data is valid.It then asynchronously pre-processes the words to add them to the model's words resource. The time that it takes for the analysis to complete depends on the number of new words that you add but is generally faster than adding a corpus or training a model. You can use the GET /v1/customizations/{ customization_id}/words or GET /v1/customizations/{customization_id}/words/{word_name} method to review the words that you add.Words with an invalid sounds_like field include an error field that describes the problem.You can use other words methods to correct errors, eliminate typos, and modify how words are pronounced as needed. Note: This method is currently a beta release that is available for US English only.
callback | The callback. |
customizationID | The requested custom language model's identifier. |
useDataPath | A boolean used to differentiate overloads with identical input types.. |
wordsJsonPath | A path to a json file to train. |
customData | Optional custom data. |
|
inline |
|
inline |
delegate void IBM.Watson.DeveloperCloud.Services.SpeechToText.v1.SpeechToText.AddCustomWordsCallback | ( | bool | success, |
string | customData | ||
) |
This callback is used by the AddCustomWords() function.
success | The success of the call. |
customData | Optional custom data. |
|
inline |
Creates a new custom language model for a specified base language model. The custom language model can be used only with the base language model for which it is created. The new model is owned by the individual whose service credentials are used to create it. Note: This method is currently a beta release that is available for US English only.
callback | The callback. |
name | The custom model name. |
base_model_name | The base model name - only en-US_BroadbandModel is currently supported. |
description | Descripotion of the custom model. |
customData | Optional custom data. |
delegate void IBM.Watson.DeveloperCloud.Services.SpeechToText.v1.SpeechToText.CreateCustomizationCallback | ( | CustomizationID | customizationID, |
string | customData | ||
) |
Thid callback is used by the CreateCustomization() function.
customizationID | The customizationID. |
customData | Optional custom data. |
|
inline |
Deletes an existing corpus from a custom language model. The service removes any out-of-vocabulary (OOV) words associated with the corpus from the custom model's words resource unless they were also added by another corpus or they have been modified in some way with the POST /v1/customizations/{customization_id}/words or PUT /v1/customizations/{customization_id}/words/{word_name} method. Removing a corpus does not affect the custom model until you train the model with the POST /v1/customizations/{customization_id}/train method. Only the owner of a custom model can use this method to delete a corpus from the model. Note: This method is currently a beta release that is available for US English only.
callback | The callback. |
customizationID | The customization ID with the corpus to be deleted. |
corpusName | The corpus name to be deleted. |
customData | Optional customization data. |
|
inline |
Deletes an existing custom language model. Only the owner of a custom model can use this method to delete the model. Note: This method is currently a beta release that is available for US English only.
callback | The callback. |
customizationID | The customization ID to be deleted. |
customData | Optional customization data. |
|
inline |
Deletes a custom word from a custom language model. You can remove any word that you added to the custom model's words resource via any means. However, if the word also exists in the service's base vocabulary, the service removes only the custom pronunciation for the word; the word remains in the base vocabulary. Removing a custom word does not affect the custom model until you train the model with the POST /v1/customizations/{customization_id}/train method.Only the owner of a custom model can use this method to delete a word from the model. Note: This method is currently a beta release that is available for US English only.
callback | The callback. |
customizationID | The customization ID to be deleted. |
customData | Optional customization data. |
delegate void IBM.Watson.DeveloperCloud.Services.SpeechToText.v1.SpeechToText.ErrorEvent | ( | string | error | ) |
This callback is used to return errors through the OnError property.
error | A string containing the error message. |
|
inline |
Lists information about all corpora that have been added to the specified custom language model. The information includes the total number of words and out-of-vocabulary (OOV) words, name, and status of each corpus. Only the owner of a custom model can use this method to list the model's corpora. Note: This method is currently a beta release that is available for US English only.
callback | The callback. |
language | The language for which custom models are to be returned. Currently, only en-US (the default) is supported. |
customData | Optional custom data. |
delegate void IBM.Watson.DeveloperCloud.Services.SpeechToText.v1.SpeechToText.GetCustomCorporaCallback | ( | Corpora | corpora, |
string | customData | ||
) |
This callback is used by the GetCustomCorpora() function.
corpora | The corpora |
customData | Optional custom data. |
|
inline |
Lists information about all corpora that have been added to the specified custom language model. The information includes the total number of words and out-of-vocabulary (OOV) words, name, and status of each corpus. Only the owner of a custom model can use this method to list the model's corpora. Note: This method is currently a beta release that is available for US English only.
callback | The callback. |
language | The language for which custom models are to be returned. Currently, only en-US (the default) is supported. |
corpusName | The name of the custom corpus to be returned. |
customData | Optional custom data. |
delegate void IBM.Watson.DeveloperCloud.Services.SpeechToText.v1.SpeechToText.GetCustomCorpusCallback | ( | Corpus | corpus, |
string | customData | ||
) |
This callback is used by the GetCustomCorpus() function.
corpus | The corpus |
customData | Optional custom data. |
|
inline |
Lists information about a custom language model. Only the owner of a custom model can use this method to query information about the model. Note: This method is currently a beta release that is available for US English only.
callback | The callback. |
customizationID | The requested custom language model's identifier. |
customData | Optional custom data. |
delegate void IBM.Watson.DeveloperCloud.Services.SpeechToText.v1.SpeechToText.GetCustomizationCallback | ( | Customization | customization, |
string | customData | ||
) |
This callback is used by the GetCusomization() function.
customization | |
customData |
|
inline |
Lists information about all custom language models that are owned by the calling user. Use the language query parameter to see all custom models for the specified language; omit the parameter to see all custom models for all languages. Note: This method is currently a beta release that is available for US English only.
callback | The callback. |
language | The language for which custom models are to be returned. Currently, only en-US (the default) is supported. |
customData | Optional custom data. |
delegate void IBM.Watson.DeveloperCloud.Services.SpeechToText.v1.SpeechToText.GetCustomizationsCallback | ( | Customizations | customizations, |
string | customData | ||
) |
This callback is used by the GetCustomizations() function.
customizations | The customizations |
customData | Optional custom data. |
|
inline |
Lists information about a custom word from a custom language model. Only the owner of a custom model can use this method to query a word from the model. Note: This method is currently a beta release that is available for US English only.
callback | The callback. |
language | The language for which custom models are to be returned. Currently, only en-US (the default) is supported. |
customData | Optional custom data. |
delegate void IBM.Watson.DeveloperCloud.Services.SpeechToText.v1.SpeechToText.GetCustomWordCallback | ( | WordData | word, |
string | customData | ||
) |
This callback is used by the GetCustomWord() function.
word | The word |
customData | Optional custom data. |
|
inline |
Lists information about all custom words from a custom language model. You can list all words from the custom model's words resource, only custom words that were added or modified by the user, or only OOV words that were extracted from corpora. Only the owner of a custom model can use this method to query the words from the model. Note: This method is currently a beta release that is available for US English only.
callback | The callback. |
language | The language for which custom models are to be returned. Currently, only en-US (the default) is supported. |
customData | Optional custom data. |
delegate void IBM.Watson.DeveloperCloud.Services.SpeechToText.v1.SpeechToText.GetCustomWordsCallback | ( | WordsList | wordList, |
string | customData | ||
) |
This callback is used by the GetCustomWords() function.
wordList | The custom words |
customData | Optional custom data. |
|
inline |
This function retrieves a specified languageModel.
callback | This callback is invoked with the requested model. The callback will be invoked with null on error. |
modelID | The name of the model to get. |
|
inline |
This function retrieves all the language models that the user may use by setting the RecognizeModel public property.
callback | This callback is invoked with an array of all available models. The callback will be invoked with null on error. |
customData | Custom string data sent with the call. |
|
inline |
<exclude>
Implements IBM.Watson.DeveloperCloud.Services.IWatsonService.
delegate byte [] IBM.Watson.DeveloperCloud.Services.SpeechToText.v1.SpeechToText.LoadFileDelegate | ( | string | filename | ) |
The delegate for loading a file.
filename | The filename to load. |
delegate void IBM.Watson.DeveloperCloud.Services.SpeechToText.v1.SpeechToText.OnAddCustomCorpusCallback | ( | bool | success, |
string | customData | ||
) |
This callback is used by the AddCustomCorpus() function.
success | |
customData |
delegate void IBM.Watson.DeveloperCloud.Services.SpeechToText.v1.SpeechToText.OnDeleteCustomCorpusCallback | ( | bool | success, |
string | customData | ||
) |
This callback is used by the DeleteCustomCorpus() function.
success | |
customData |
delegate void IBM.Watson.DeveloperCloud.Services.SpeechToText.v1.SpeechToText.OnDeleteCustomizationCallback | ( | bool | success, |
string | customData | ||
) |
This callback is used by the DeleteCustomization() function.
success | |
customData |
delegate void IBM.Watson.DeveloperCloud.Services.SpeechToText.v1.SpeechToText.OnDeleteCustomWordCallback | ( | bool | success, |
string | customData | ||
) |
This callback is used by the DeleteCustomWord() function.
success | |
customData |
delegate void IBM.Watson.DeveloperCloud.Services.SpeechToText.v1.SpeechToText.OnGetModel | ( | Model | model, |
string | customData | ||
) |
This callback object is used by the GetModel() method.
model | The resultant model. |
delegate void IBM.Watson.DeveloperCloud.Services.SpeechToText.v1.SpeechToText.OnGetModels | ( | ModelSet | models, |
string | customData | ||
) |
This callback object is used by the GetModels() method.
models | Array of available models. |
customData | Custom string data sent with the call. |
|
inline |
This function should be invoked with the AudioData input after StartListening() method has been invoked. The user should continue to invoke this function until they are ready to call StopListening(), typically microphone input is sent to this function.
clip | A AudioData object containing the AudioClip and max level found in the clip. |
delegate void IBM.Watson.DeveloperCloud.Services.SpeechToText.v1.SpeechToText.OnRecognize | ( | SpeechRecognitionEvent | results | ) |
This callback object is used by the Recognize() and StartListening() methods.
results | The ResultList object containing the results. |
|
inline |
This function POSTs the given audio clip the recognize function and convert speech into text. This function should be used only on AudioClips under 4MB once they have been converted into WAV format. Use the StartListening() for continuous recognition of text.
clip | The AudioClip object. |
callback | A callback to invoke with the results. |
|
inline |
Resets a custom language model by removing all corpora and words from the model.Resetting a custom model initializes the model to its state when it was first created. Metadata such as the name and language of the model are preserved.Only the owner of a custom model can use this method to reset the model. Note: This method is currently a beta release that is available for US English only.
callback | The callback. |
customizationID | The requested custom language model's identifier. |
customData | Optional custom data. |
delegate void IBM.Watson.DeveloperCloud.Services.SpeechToText.v1.SpeechToText.ResetCustomizationCallback | ( | bool | success, |
string | customData | ||
) |
This callback is used by the ResetCustomization() function.
success | The success of the call. |
customData | Optional custom data. |
|
inline |
This starts the service listening and it will invoke the callback for any recognized speech. OnListen() must be called by the user to queue audio data to send to the service. StopListening() should be called when you want to stop listening.
callback | All recognize results are passed to this callback. |
|
inline |
Invoke this function stop this service from listening.
|
inline |
Initiates the training of a custom language model with new corpora, words, or both.After adding training data to the custom model with the corpora or words methods, use this method to begin the actual training of the model on the new data.You can specify whether the custom model is to be trained with all words from its words resources or only with words that were added or modified by the user.Only the owner of a custom model can use this method to train the model. This method is asynchronous and can take on the order of minutes to complete depending on the amount of data on which the service is being trained and the current load on the service.The method returns an HTTP 200 response code to indicate that the training process has begun. You can monitor the status of the training by using the GET /v1/customizations/{customization_id} method to poll the model's status. Use a loop to check the status every 10 seconds. The method returns a Customization object that includes status and progress fields. A status of available means that the custom model is trained and ready to use. If training is in progress, the progress field indicates the progress of the training as a percentage complete. Note: For this beta release, the progress field does not reflect the current progress of the training. The field changes from 0 to 100 when training is complete. Training can fail to start for the following reasons: No training data (corpora or words) have been added to the custom model. Pre-processing of corpora to generate a list of out-of-vocabulary (OOV) words is not complete. Pre-processing of words to validate or auto-generate sounds-like pronunciations is not complete. One or more words that were added to the custom model have invalid sounds-like pronunciations that you must fix. Note: This method is currently a beta release that is available for US English only.
callback | The callback. |
customizationID | The requested custom language model's identifier. |
customData | Optional custom data. |
delegate void IBM.Watson.DeveloperCloud.Services.SpeechToText.v1.SpeechToText.TrainCustomizationCallback | ( | bool | success, |
string | customData | ||
) |
This callback is used by the TrainCustomization() function.
success | The success of the call. |
customData | Optional custom data. |
|
inline |
Upgrades a custom language model to the latest release level of the Speech to Text service. The method bases the upgrade on the latest trained data stored for the custom model. If the corpora or words for the model have changed since the model was last trained, you must use the POST /v1/customizations/{customization_id}/train method to train the model on the new data. Only the owner of a custom model can use this method to upgrade the model. Note: This method is not currently implemented.It will be added for a future release of the API.
callback | The callback. |
customizationID | The requested custom language model's identifier. |
customData | Optional custom data. |
delegate void IBM.Watson.DeveloperCloud.Services.SpeechToText.v1.SpeechToText.UpgradeCustomizationCallback | ( | bool | success, |
string | customData | ||
) |
This callback is used by the UpgradeCustomization() function.
success | The success of the call. |
customData | Optional custom data. |
|
get |
True if AudioData has been sent and we are recognizing speech.
|
getset |
Gets and sets the credentials of the service. Replace the default endpoint if endpoint is defined.
|
getset |
If true, then we will try not to send silent audio clips to the server. This can save bandwidth when no sound is happening.
|
getset |
If true, then we will try to continuously recognize speech.
|
getset |
If true, then we will get interim results while recognizing. The user will then need to check the Final flag on the results.
|
getset |
True to return timestamps of words with results.
|
getset |
True to return word confidence with results.
|
get |
True if StartListening() has been called.
|
getset |
NON-MULTIPART ONLY: Array of keyword strings to spot in the audio. Each keyword string can include one or more tokens. Keywords are spotted only in the final hypothesis, not in interim results. Omit the parameter or specify an empty array if you do not need to spot keywords.
|
getset |
NON-MULTIPART ONLY: Confidence value that is the lower bound for spotting a keyword. A word is considered to match a keyword if its confidence is greater than or equal to the threshold. Specify a probability between 0 and 1 inclusive. No keyword spotting is performed if you omit the parameter. If you specify a threshold, you must also specify one or more keywords.
|
getset |
Set this property to overload the internal file loading of this class.
|
getset |
Returns the maximum number of alternatives returned by recognize.
|
getset |
This delegate is invoked when an error occurs.
|
getset |
NON-MULTIPART ONLY: If true (the default), filters profanity from all output except for keyword results by replacing inappropriate words with a series of asterisks. Set the parameter to false to return results with no censoring. Applies to US English transcription only.
|
getset |
This property controls which recognize model we use when making recognize requests of the server.
|
getset |
A value from 1.0 to 0.0 that determines what is considered silence. If the audio level is below this value then we consider it silence.
|
getset |
NON-MULTIPART ONLY: If true, converts dates, times, series of digits and numbers, phone numbers, currency values, and Internet addresses into more readable, conventional representations in the final transcript of a recognition request. If false (the default), no formatting is performed. Applies to US English transcription only.
|
getset |
NON-MULTIPART ONLY: Indicates whether labels that identify which words were spoken by which participants in a multi-person exchange are to be included in the response. If true, speaker labels are returned; if false (the default), they are not. Speaker labels can be returned only for the following language models: en-US_NarrowbandModel, en-US_BroadbandModel, es-ES_NarrowbandModel, es-ES_BroadbandModel, ja-JP_NarrowbandModel, and ja-JP_BroadbandModel. Setting speaker_labels to true forces the timestamps parameter to be true, regardless of whether you specify false for the parameter.
|
getset |
Gets and sets the endpoint URL for the service.
|
getset |
NON-MULTIPART ONLY: Confidence value that is the lower bound for identifying a hypothesis as a possible word alternative (also known as "Confusion Networks"). An alternative word is considered if its confidence is greater than or equal to the threshold. Specify a probability between 0 and 1 inclusive. No alternative words are computed if you omit the parameter.