الكتابة بالعربي Arabic
الكتابة بالعربي Arabic
// Imports the Google Cloud client library | |
const speech = require('@google-cloud/speech'); | |
// Creates a client | |
const client = new speech.SpeechClient(); | |
// const gcsUri = 'gs://my-bucket/audio.raw'; | |
// const encoding = 'Encoding of the audio file, e.g. LINEAR16'; | |
// const sampleRateHertz = 16000; | |
// const languageCode = 'BCP-47 language code, e.g. en-US'; |
// require fs to be able to read the file | |
const fs = require('fs') | |
// define the path where the file located | |
const filename = './resources/test.wav' | |
// the changes below should inclouded inside quickstart function | |
// read the file | |
const file = fs.readFileSync(filename) | |
// convert it to base 64 | |
const audioBytes = file.toString('base64') |
الكتابة بالعربي Arabic