unispeech / asterisk-unimrcp

UniMRCP modules for Asterisk
http://www.unimrcp.org/asterisk
GNU General Public License v2.0
48 stars 35 forks source link

Audible pop when playing wav file using MRCPRecog #32

Closed DRoet closed 4 years ago

DRoet commented 5 years ago

Hi, I somehow bumped into the following problem:

When you use the MRCPrecog function to play a .wav prompt containing a fact chunk header it shows a debug line in the asterisk console: [Jul 2 16:59:04] DEBUG[640][C-00000029]: format_wav.c:192 check_header: Skipping unknown block 'fact'

However this also causes a small "popping" sound at the start of the prompt, which is really annoying for the end user.

Playing the same prompt in the Asterisk PLAYBACK function causes no issues.

wondering if anyone can help me with this...

achaloyan commented 5 years ago

MRCPRecog() uses Asterisk functions ast_openstream() with further reference to ast_playstream() to play a prompt while performing recognition. See the function astchan_stream_file. Based on your description, I would guess this method does not properly skip the fact chunk, whereas Playback() uses ast_streamfile() internally. So, this issue belongs to Asterisk.