DeepSpeech: [Good First Bug] Implement an API to get textual descriptions of error codes
It would be nice to have an API similar to strerror to get textual descriptions of error codes so applications can show something meaningful to users in error messages.
This was already implemented ad-hoc in the .NET bindings, see here: https://github.com/mozilla/DeepSpeech/blob/0b82c751db58d9d2d90e861f9af04e671fd2ab41/native_client/dotnet/DeepSpeechClient/DeepSpeech.cs#L86-L125
Steps to fix this would be roughly:
Add a new API to native_client/deepspeech.h
, something like:
char* DS_ErrorCodeToErrorMessage(int aErrorCode);
And then in native_client/deepspeech.cc
, implement the function by returning the appropriate error message. The strings can be static, inlined directly in the source code. The documentation for DS_ErrorCodeToErrorMessage
should indicate that the returned pointers are read only and MUST not be deallocated or modified.
Feel free to ask any questions if any of this is confusing.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 15 (5 by maintainers)
I would like to work on this issue!
Yes I would like to take this, thanks.
Ok @reuben thanks.