-
Notifications
You must be signed in to change notification settings - Fork 289
Code Samples for new v1p1beta1 features #118
Conversation
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here (e.g. What to do if you already signed the CLAIndividual signers
Corporate signers
|
Codecov Report
@@ Coverage Diff @@
## master #118 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 2 2
Lines 34 34
=====================================
Hits 34 34 Continue to review full report at Codecov.
|
samples/betaFeatures.js
Outdated
|
||
// const defaultStereoURI = | ||
// 'gs://cloud-samples-tests/speech/commercial_stereo.wav'; | ||
const gnome = `/Users/cfrater/SPEECH3/nodejs-speech/samples/resources/Google_Gnome.wav`; |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
samples/betaFeatures.js
Outdated
`multiChannelTranscribe`, | ||
`Differentiates input by audio channel in local audio file.`, | ||
{}, | ||
opts => speechTranscribeMultiChannel(opts.speechFileGnome) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
samples/betaFeatures.js
Outdated
`multiChannelTranscribeGCS`, | ||
`Differentiates input by audio channel from GCS audio file.`, | ||
{}, | ||
opts => speechTranscribeMultichannelGCS(opts.gcsUriStereo) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
samples/betaFeatures.js
Outdated
encoding: `LINEAR16`, | ||
sampleRateHertz: 16000, | ||
languageCode: `en-US`, | ||
audioChannelCount: 1, |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
samples/betaFeatures.js
Outdated
sampleRateHertz: 44100, | ||
languageCode: `en-US`, | ||
alternativeLanguageCodes: [`es-ES`, `en-US`], | ||
audioChannelCount: 2, |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
samples/betaFeatures.js
Outdated
encoding: `FLAC`, | ||
sampleRateHertz: 16000, | ||
languageCode: `en-US`, | ||
enableWordTimeOffsets: true, |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@@ -0,0 +1,82 @@ | |||
// /** | |||
// * Copyright 2016, Google, Inc. |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
samples/betaFeatures.js
Outdated
@@ -0,0 +1,608 @@ | |||
/** | |||
* Copyright 2017, Google, Inc. |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
samples/betaFeatures.js
Outdated
audio: audio, | ||
}; | ||
|
||
// client |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
|
||
// Creates a client | ||
const client = new speech.SpeechClient(); | ||
|
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
samples/betaFeatures.js
Outdated
|
||
const fs = require('fs'); | ||
const speech = require('@google-cloud/speech').v1p1beta1; | ||
|
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
|
||
// Creates a client | ||
const client = new speech.SpeechClient(); | ||
|
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
|
||
// Creates a client | ||
const client = new speech.SpeechClient(); | ||
|
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
|
||
// Creates a client | ||
const client = new speech.SpeechClient(); | ||
|
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
|
||
// Creates a client | ||
const client = new speech.SpeechClient(); | ||
|
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
samples/betaFeatures.js
Outdated
// [END speechTranscribeWordLevelConfidence] | ||
} | ||
|
||
function speechTranscribeWordLevelConfidenceGCS(gcsUri) { |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
A Googler has manually verified that the CLAs look good. (Googler, please make sure the reason for overriding the CLA status is clearly documented in these comments.) |
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here (e.g. What to do if you already signed the CLAIndividual signers
Corporate signers
|
samples/betaFeatures.js
Outdated
// [START speech_transcribe_multilanguage] | ||
|
||
const fs = require('fs'); | ||
const speech = require('@google-cloud/speech').v1p1beta1; |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
samples/betaFeatures.js
Outdated
// [END speech_transcribe_word_level_confidence_gcs] | ||
} | ||
|
||
//audio file paths for Defaults |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
const output = await runAsync(`${cmd} wordLevelConfidenceGCS`, cwd); | ||
t.true( | ||
output.includes(`Transcription: how old is the Brooklyn Bridge`) && | ||
output.includes(`Confidence: 0.9836039543151855`) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@@ -13,6 +13,8 @@ | |||
* limitations under the License. | |||
*/ | |||
|
|||
/* eslint-disable */ |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@@ -13,6 +13,8 @@ | |||
* limitations under the License. | |||
*/ | |||
|
|||
/* eslint-disable */ |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@@ -13,6 +13,8 @@ | |||
* limitations under the License. | |||
*/ | |||
|
|||
/* eslint-disable */ |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overview of things to fix:
- remove various extraneous newlines
- fix 1 missing comment on client library comment
- explain why eslint has been disabled on various otherwise unchanged files or re-enable eslint on these files (see comment)
- regenerate scaffolding (there is one comment from jerjou re: 'FLAC' which I think simply needs a regen)
- reply to jerjou's question about formatting
- add multi-channel GCS back or reply to jerjou's comment with why you are not adding it back
- reply to my comment about CLI default files (remove this code if there is no existing precedent for it)
- fix text to not check for exact confidence
These all have existing comments. Thanks!
We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google. |
…peech into BetaFeatures getting latest..
samples/README.md
Outdated
--multiSpeechFile, --ms [string] [default: "./resources/multi.wav"] | ||
--multiSpeechUri, --msu [string] [default: "gs://cloud-samples-tests/speech/multi.wav"] | ||
--speechFileStereo, --fs [string] [default: "./samples/resources/commercial_stereo.wav"] | ||
--brooklynBridgeSpeechFile, --bb |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@@ -0,0 +1,14 @@ | |||
{ |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
A Googler has manually verified that the CLAs look good. (Googler, please make sure the reason for overriding the CLA status is clearly documented in these comments.) |
Code Samples for new features added to
v1p1beta1
endpointCanonical Beta Samples: Python, Java (PR)
Speaker Diarization
speech_transcribe_diarization
speech_transcribe_diarization_gcs
Multi-Channel Audio
speech_transcribe_multichannel
speech_transcribe_multichannel_gcs
Multi-Language
speech_transcribe_multilang
speech_transcribe_multilang_gcs
Word-Level Confidence
speech_transcribe_word_level_confidence
speech_transcribe_word_level_confidence_gcs
Tasks