-
Notifications
You must be signed in to change notification settings - Fork 605
Recognize Event AttachmentReader Errors #118
Comments
Hi @simplistiq, These errors are symptomatic of a performance issue. The SDS is a circular buffer, which you would typically write to continuously from your microphone input. The rate of writing is constrained by the AudioFormat - 16-bit samples at 16KHz means you should have a steady rate of 32KB/second. In a system which is working well, the cpu will be powerful enough to pull data out of the SDS faster than it is being written in, and the network connection to AVS will also be fast enough to stream data faster than it is being written in. This should generally keep the SDS drained so that it is nearly empty most of the time. However, if you get into a situation where you are reading data from the SDS at a rate less than 32KB/second, there is a chance it will fill up and start overwriting data that you have not read yet. That is what the first error is telling us. There are a few reasons this might occur:
If the problem is caused by 1 or 2, you should be able to address it by increasing the size of the SDS so that it can accumulate more data during a temporary slowdown. If the problem is caused by 3 or 4, you will need to evaluate system changes. Either scaling up the hardware, or optimizing other system components to free up CPU cycles and bandwidth. Ken |
I forgot to add - the SampleApp instantiates the SDS here; this is where you would make changes to increase the SDS size. |
After a multiple recognize events, I am seeing the following. The only way out is to kill the SDK and then restart it again.
2017-08-28 22:07:26.967 [ 9] E SdsReader:seekFailed:reason=seekOverwrittenData
2017-08-28 22:07:26.967 [ 9] E InProcessAttachmentReader:ConstructorFailed:reason=could not create an SDS reader
2017-08-28 22:07:26.967 [ 9] E InProcessAttachmentReader:createFailed:reason=object not fully created
2017-08-28 22:07:26.967 [ 9] E AudioInputProcessor:executeRecognizeFailed:reason=Failed to create attachment reader
The text was updated successfully, but these errors were encountered: