diff --git a/packages/google-cloud-speech/README.md b/packages/google-cloud-speech/README.md index e33dd6386c6..bd17b43b40e 100644 --- a/packages/google-cloud-speech/README.md +++ b/packages/google-cloud-speech/README.md @@ -59,22 +59,17 @@ npm install @google-cloud/speech ```javascript // Imports the Google Cloud client library const speech = require('@google-cloud/speech'); -const fs = require('fs').promises; // Creates a client const client = new speech.SpeechClient(); async function quickstart() { - // The name of the audio file to transcribe - const fileName = './resources/audio.raw'; - - // Reads a local audio file and converts it to base64 - const file = await fs.readFile(fileName); - const audioBytes = file.toString('base64'); + // The path to the remote LINEAR16 file + const gcsUri = 'gs://cloud-samples-data/speech/brooklyn_bridge.raw'; // The audio file's encoding, sample rate in hertz, and BCP-47 language code const audio = { - content: audioBytes, + uri: gcsUri, }; const config = { encoding: 'LINEAR16', @@ -109,6 +104,7 @@ has instructions for running the samples. | Microphone stream | [source code](https://github.com/googleapis/nodejs-speech/blob/master/samples/MicrophoneStream.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-speech&page=editor&open_in_editor=samples/MicrophoneStream.js,samples/README.md) | | Beta Features | [source code](https://github.com/googleapis/nodejs-speech/blob/master/samples/betaFeatures.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-speech&page=editor&open_in_editor=samples/betaFeatures.js,samples/README.md) | | Infinite Streaming | [source code](https://github.com/googleapis/nodejs-speech/blob/master/samples/infiniteStreaming.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-speech&page=editor&open_in_editor=samples/infiniteStreaming.js,samples/README.md) | +| Multi Region | [source code](https://github.com/googleapis/nodejs-speech/blob/master/samples/multiRegion.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-speech&page=editor&open_in_editor=samples/multiRegion.js,samples/README.md) | | Profanity Filter | [source code](https://github.com/googleapis/nodejs-speech/blob/master/samples/profanityFilter.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-speech&page=editor&open_in_editor=samples/profanityFilter.js,samples/README.md) | | Quickstart | [source code](https://github.com/googleapis/nodejs-speech/blob/master/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-speech&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) | | Recognize | [source code](https://github.com/googleapis/nodejs-speech/blob/master/samples/recognize.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-speech&page=editor&open_in_editor=samples/recognize.js,samples/README.md) | diff --git a/packages/google-cloud-speech/samples/README.md b/packages/google-cloud-speech/samples/README.md index 30328439c58..26a8902f357 100644 --- a/packages/google-cloud-speech/samples/README.md +++ b/packages/google-cloud-speech/samples/README.md @@ -15,6 +15,7 @@ * [Microphone stream](#microphone-stream) * [Beta Features](#beta-features) * [Infinite Streaming](#infinite-streaming) + * [Multi Region](#multi-region) * [Profanity Filter](#profanity-filter) * [Quickstart](#quickstart) * [Recognize](#recognize) @@ -91,6 +92,23 @@ __Usage:__ +### Multi Region + +View the [source code](https://github.com/googleapis/nodejs-speech/blob/master/samples/multiRegion.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-speech&page=editor&open_in_editor=samples/multiRegion.js,samples/README.md) + +__Usage:__ + + +`node samples/multiRegion.js` + + +----- + + + + ### Profanity Filter View the [source code](https://github.com/googleapis/nodejs-speech/blob/master/samples/profanityFilter.js). diff --git a/packages/google-cloud-speech/synth.metadata b/packages/google-cloud-speech/synth.metadata index c3947679e4d..3184d5fd721 100644 --- a/packages/google-cloud-speech/synth.metadata +++ b/packages/google-cloud-speech/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-speech.git", - "sha": "a2b3adc18434e80862fadf4242fbc6b58f0992be" + "sha": "7369d105e24727f9844e51f504694874258ceac1" } }, {