2

Hope you're all well,

I'm trying to use google speech API to convert interview I give directly into text files.

I'm trying to get the environment up and running, so I'm testing it with a file : I'm really new with audio, so I converted a test file into FLAC using an online converter : http://www.online-convert.com/ Then, I used ffprobe in order to verify, it looks good to me,

Input #0, flac, from '../../Walk_Away.flac':
Metadata:
    MAJOR_BRAND     : mp42
    MINOR_VERSION   : 0
    COMPATIBLE_BRANDS: isommp42
    ARTIST          : Aaron Michael Cox
    TITLE           : Walk Away
    ENCODER         : Lavf57.57.100
  Duration: 00:03:12.08, start: 0.000000, bitrate: 185 kb/s
    Stream #0:0: Audio: flac, 16000 Hz, mono, s16
[FORMAT]
filename=../../Walk_Away.flac
nb_streams=1
nb_programs=0
format_name=flac
format_long_name=raw FLAC
start_time=0.000000
duration=192.078375
size=4444256
bit_rate=185101
probe_score=50
TAG:MAJOR_BRAND=mp42
TAG:MINOR_VERSION=0
TAG:COMPATIBLE_BRANDS=isommp42
TAG:ARTIST=Aaron Michael Cox
TAG:TITLE=Walk Away
TAG:ENCODER=Lavf57.57.100
[/FORMAT]

but, when I'm trying the :

node recognize.js async-gcs gs://file.flac -e LINEAR16 -r 16000

I receive a really sad result : "Transcription: ,,"

Can anyone help me please ? Thanks a lot Ivan

ilellouch
  • 79
  • 7

1 Answers1

0

The problem is that the file is a FLAC file, but in the command you've specified that it's a raw audio file (LINEAR16). Try again but specify that it's a FLAC file with the option -e FLAC and see if that helps. So the command should look something like this:

node recognize.js async-gcs gs://file.flac -e FLAC -r 16000

Alternatively you could convert the audio file to a raw audio file.

blambert
  • 1,340
  • 13
  • 19