juesato / gspeech-api

Node.js wrapper library to easily access Google Speech Recognition API
20 stars 9 forks source link

TypeError: Cannot read property 'format' of undefined #3

Open Tontome opened 7 years ago

Tontome commented 7 years ago

I have been trying to run the examples of this module. Unfortunately, I get always this error :

tom@Tom-VAIO:~/src/nodeJs/test-gspeech-api$ node timedTranscript.js /mnt/B8CAF9F7CAF9B1AC/TomsFiles/private/GDrive_insync/src/nodeJs/test-gspeech-api/node_modules/gspeech-api/index.js:169 var totalDuration = info.format.duration; ^

TypeError: Cannot read property 'format' of undefined at /mnt/B8CAF9F7CAF9B1AC/TomsFiles/private/GDrive_insync/src/nodeJs/test-gspeech-api/node_modules/gspeech-api/index.js:169:28 at handleCallback (/mnt/B8CAF9F7CAF9B1AC/TomsFiles/private/GDrive_insync/src/nodeJs/test-gspeech-api/node_modules/fluent-ffmpeg/lib/ffprobe.js:106:9) at /mnt/B8CAF9F7CAF9B1AC/TomsFiles/private/GDrive_insync/src/nodeJs/test-gspeech-api/node_modules/fluent-ffmpeg/lib/ffprobe.js:145:16 at /mnt/B8CAF9F7CAF9B1AC/TomsFiles/private/GDrive_insync/src/nodeJs/test-gspeech-api/node_modules/fluent-ffmpeg/lib/capabilities.js:194:9 at /mnt/B8CAF9F7CAF9B1AC/TomsFiles/private/GDrive_insync/src/nodeJs/test-gspeech-api/node_modules/async/dist/async.js:356:16 at nextTask (/mnt/B8CAF9F7CAF9B1AC/TomsFiles/private/GDrive_insync/src/nodeJs/test-gspeech-api/node_modules/async/dist/async.js:5057:29) at /mnt/B8CAF9F7CAF9B1AC/TomsFiles/private/GDrive_insync/src/nodeJs/test-gspeech-api/node_modules/async/dist/async.js:5064:13 at apply (/mnt/B8CAF9F7CAF9B1AC/TomsFiles/private/GDrive_insync/src/nodeJs/test-gspeech-api/node_modules/async/dist/async.js:21:25) at /mnt/B8CAF9F7CAF9B1AC/TomsFiles/private/GDrive_insync/src/nodeJs/test-gspeech-api/node_modules/async/dist/async.js:56:12 at /mnt/B8CAF9F7CAF9B1AC/TomsFiles/private/GDrive_insync/src/nodeJs/test-gspeech-api/node_modules/async/dist/async.js:840:16

horasikus commented 7 years ago

You must have ffmpeg AND ffprobe both command line tools in your environment path because gspeech.api depends on node-fluent-ffmpeg

https://github.com/fluent-ffmpeg/node-fluent-ffmpeg#prerequisites https://ffmpeg.org/download.html