I can’t get the transcript using offline ASR Recognize in Node js

Description

I am trying to use asr offline Recognize to recognize some audio files as Mandarin.
In node js, no matter what audio file I pass, its alternatives length is always 0, but in python these audio files will return its transcript perfectly.
My code is on Google Drive: riva - Google Drive
May I ask if there is any error in any step?

Relevant Files

asr_zh_cn_1_offline_1.rmir
common_voice_zh-TW_19262458.wav
test.js
wave_test.py

https://drive.google.com/drive/folders/1Pd2tYtnTPQL9R-8CteCArQvHJuf4taxk?usp=sharing

Hi @jason.hung1
Thanks for sharing the detailed script and model files. It will help us debug the issue better.
We are currently looking into it and will update you as soon as possible.

Thanks

HI @SunilJB

To add a question, If the audio file is too large, has the error message (Error: 8 RESOURCE_EXHAUSTED: Received message larger than max will occur).Except to use smaller audio file, do you have any suggest solution to this question.

Thanks

Hi @jason.hung1 ,

We don’t recommend running much larger files than that currently.
But you can try to to simply use the streaming API instead.

Thanks!

The sample rate of the audio file you shared is 48khz and the javascript you shared is hard-coding 16khz as the sample rate. Unless you are doing some resampling elsewhere, that will not work. Please specify the correct sample rate.