Little bit confused by the behaviour that changing sample_rate_hertz in RecognitionConfig seems to have no effect. It is picking up sample rate from input file. Trying to write our own client and it always returns following error even when correct sample rate is provided in RecognitionConfig and input file is 16Khz wav file.
ERROR ([5.5.0~1457-eb28]:MaybeCreateResampler():online-feature.cc:99) Sampling frequency mismatch, expected 16000, got 8000
Little bit confused by the behaviour that changing sample_rate_hertz in RecognitionConfig seems to have no effect. It is picking up sample rate from input file. Trying to write our own client and it always returns following error even when correct sample rate is provided in RecognitionConfig and input file is 16Khz wav file.
ERROR ([5.5.0~1457-eb28]:MaybeCreateResampler():online-feature.cc:99) Sampling frequency mismatch, expected 16000, got 8000
The issue is when sending raw:
python scripts/example_client.py sample.wav --model=general --lang=en Works. Returns recognition results
python scripts/example_client.py sample.wav --model=general --lang=en --raw Fails with Sampling frequency mismatch, expected 16000, got 8000
$soxi sample.wav
Input File : 'sample.wav' Channels : 1 Sample Rate : 16000 Precision : 16-bit Duration : 00:00:02.30 = 36816 samples ~ 172.575 CDDA sectors File Size : 73.7k Bit Rate : 256k Sample Encoding: 16-bit Signed Integer PCM