const fs = require('fs');
const speech = require('@google-cloud/speech');
-const client = new speech.SpeechClient();
+const client = new speech.SpeechClient({
+ keyFilename: 'google-api-key.json'
+});
+
const languageCode = "fr-CA";
exports.setLanguage = function(code) {
const EventEmitter = require('events');
const speech = require('@google-cloud/speech');
-const client = new speech.SpeechClient();
+const client = new speech.SpeechClient({
+ keyFilename: 'google-api-key.json'
+});
const languageCode = "fr-CA";