Skip to content

Commit 9368c27

Browse files
feat: adds a multi region sample (#685)
1 parent a49b15b commit 9368c27

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

packages/google-cloud-node/samples/quickstart.js

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,22 +18,17 @@ function main() {
1818
// [START speech_quickstart]
1919
// Imports the Google Cloud client library
2020
const speech = require('@google-cloud/speech');
21-
const fs = require('fs').promises;
2221

2322
// Creates a client
2423
const client = new speech.SpeechClient();
2524

2625
async function quickstart() {
27-
// The name of the audio file to transcribe
28-
const fileName = './resources/audio.raw';
29-
30-
// Reads a local audio file and converts it to base64
31-
const file = await fs.readFile(fileName);
32-
const audioBytes = file.toString('base64');
26+
// The path to the remote LINEAR16 file
27+
const gcsUri = 'gs://cloud-samples-data/speech/brooklyn_bridge.raw';
3328

3429
// The audio file's encoding, sample rate in hertz, and BCP-47 language code
3530
const audio = {
36-
content: audioBytes,
31+
uri: gcsUri,
3732
};
3833
const config = {
3934
encoding: 'LINEAR16',

0 commit comments

Comments
 (0)