zaf / asterisk-speech-recog

Speech recognition script for Asterisk that uses google's speech engine.
GNU General Public License v2.0
245 stars 131 forks source link

Sln file availability after recording #47

Closed mirkpul closed 5 years ago

mirkpul commented 6 years ago

Using Asterisk version 13.17 on ubuntu 17.10 the file sln takes time to be persisted. So then flac conversion fails with 256 error code returned (file does not exist).

There could be a parallel process running on asterisk saving the sln files. If I add a sleep before converting the file it works.

Wondering if it would be better to check the file presence and if it's locked.

zaf commented 6 years ago

Do you, by any chance, have the parameter 'cache_record_files' set to 'yes' in your asterisk.conf?

mirkpul commented 6 years ago

No, it's commented out:

;cache_record_files = yes ; Cache recorded sound files to another

Any other idea?

Mirko

Il giorno ven 23 feb 2018 alle ore 22:21 Lefteris Zafiris < notifications@github.com> ha scritto:

Do you, by any chance, have the parameter 'cache_record_files' set to 'yes' in your asterisk.conf?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/zaf/asterisk-speech-recog/issues/47#issuecomment-368142041, or mute the thread https://github.com/notifications/unsubscribe-auth/AFjVS53X8qlhGdqDDXZ0DCn7sd46pKVTks5tXyvngaJpZM4SQ7uy .

zaf commented 6 years ago

The only similar problem I have come across is with cache_record_files enabled in some small systems like raspberry pi. In these cases the file was empty, syncing to disk was taking time. I can't say I have seen the behaviour you describe before.

mirkpul commented 6 years ago

It's a virtual machine on vmware Player..do you think this could be the problem?

Mirko

Il 26 Feb 2018 11:49 AM, "Lefteris Zafiris" notifications@github.com ha scritto:

The only similar problem I have come across is with cache_record_files enabled in some small systems like raspberry pi. In these cases the file was empty, syncing to disk was taking time. I can't say I have seen the behaviour you describe before.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/zaf/asterisk-speech-recog/issues/47#issuecomment-368461735, or mute the thread https://github.com/notifications/unsubscribe-auth/AFjVS7Qoiy9fTFwe9LPAuZu7eiLiT4msks5tYow9gaJpZM4SQ7uy .