الكتابة بالعربي Arabic
الكتابة بالعربي Arabic
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const config = { | |
encoding: 'LINEAR16', | |
sampleRateHertz: 44100, | |
languageCode: 'tr-TR', // For turkish language | |
audioChannelCount: 2, // Number of audio channel | |
enableSeparateRecognitionPerChannel: flase, // to not get the result of each channel separately | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Imports the Google Cloud client library | |
const speech = require("@google-cloud/speech"); | |
const fs = require('fs') | |
// Creates a client | |
const client = new speech.SpeechClient(); | |
async function main() { | |
const gcsUri = 'gs://aksiontest/one-turkish.wav'; | |
const encoding = 'LINEAR16'; | |
const sampleRateHertz = 44100; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let a:i32 = 5; | |
let b = 6 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let mut a : i32 = 5; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fn main (){ | |
let x = 1 | |
println!(" value of X{}", x); | |
println!("{}{}", 2, 2); | |
// single placeholder | |
println!("Number: {}", 1); | |
// multiple placeholders | |
println!("{} is a {} language", "Rust", "programing"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fn main (){ | |
let x = 1 ; | |
if x == 1 { | |
println!( "value matched" ); | |
} else { | |
println!( "value not matched" ); | |
} | |
} |
OlderNewer