print Dumper $speech->syncrecognize->results AUTHOR Returns the transcribed data as Arrayref. my $operation = $speech->syncrecognize Ĭhecks if the speech-recognition processing of the audio data is complete. Performs synchronous speech recognition: receive results after all audio has been sent and processed. my $operation = $speech->asyncrecognize() Performs asynchronous speech recognition: receive results via the interface. If that's not possible, use the native sample rate of the audio source (instead of re-sampling). For best results, set the sampling rate of the audio source to 16000 Hz. Sample rate in Hertz of the audio data to be recognized. Language codes samplrate my $sample_rate = $speech->samplerate('16000') See Language Support for a list of the currently supported language codes. Example: "en-IN" for English (United States), "en-GB" for English (United Kingdom), "fr-FR" for French (France). The language of the supplied audio as a BCP-47 language tag. My $file = $speech->('path/to/audio/file.wav') language my $lang = $speech->language('en-IN') Lossy codecs do not recommend, as they result in a lower-quality * amr_wb - Adaptive Multi-Rate Wideband codec. * amr - Adaptive Multi-Rate Narrowband codec. * mulaw - 8-bit samples that compand 14-bit audio samples using Acceptable values are: * linear16 - Uncompressed 16-bit signed little-endian samples. encoding my $encoding = $speech->encoding('linear16') Įncoding of audio data to be recognized. See L for more details about API authentication. To create, Google Service Account Key: 1) Login to Google Apps Console and select your projectĢ) Click on create credentials-> service account key.Ĥ) Select a service account and key type as JSON and click on create and downlaoded the JSON file. $speech->secret_file('/my/google/app/project/sp/json/file') Loads the JSON file from Google with the client ID informations. This module lets you access Google cloud speech service. My $operation = $speech->asyncrecognize() Secret_file => 'my/google/app/project/sa/json/file' Google::Cloud::Speech - An interface to Google cloud speech service SYNOPSIS use Data::Dumper
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |