'Metadata' does not name a type
xkisu opened this issue · comments
When trying to build the example program with the default models and audio I get the following errors:
# github.com/asticode/go-astideepspeech
deepspeech.cpp:30:13: error: 'Metadata' does not name a type
Metadata* sttWithMetadata(const short* aBuffer, unsigned int aBufferSize, unsigned int aSampleRate)
^~~~~~~~
deepspeech.cpp:60:5: error: 'Metadata' does not name a type
Metadata* STTWithMetadata(ModelWrapper* w, const short* aBuffer, unsigned int aBufferSize, int aSampleRate)
^~~~~~~~
deepspeech.cpp:65:36: error: 'Metadata' was not declared in this scope
double Metadata_GetProbability(Metadata* m)
^~~~~~~~
deepspeech.cpp:65:46: error: 'm' was not declared in this scope
double Metadata_GetProbability(Metadata* m)
^
deepspeech.cpp:70:30: error: 'Metadata' was not declared in this scope
int Metadata_GetNumItems(Metadata* m)
^~~~~~~~
deepspeech.cpp:70:40: error: 'm' was not declared in this scope
int Metadata_GetNumItems(Metadata* m)
^
deepspeech.cpp:75:5: error: 'MetadataItem' does not name a type
MetadataItem* Metadata_GetItems(Metadata* m)
^~~~~~~~~~~~
deepspeech.cpp:80:37: error: 'MetadataItem' was not declared in this scope
char* MetadataItem_GetCharacter(MetadataItem* mi)
^~~~~~~~~~~~
deepspeech.cpp:80:51: error: 'mi' was not declared in this scope
char* MetadataItem_GetCharacter(MetadataItem* mi)
^~
deepspeech.cpp:85:34: error: 'MetadataItem' was not declared in this scope
int MetadataItem_GetTimestep(MetadataItem* mi)
^~~~~~~~~~~~
deepspeech.cpp:85:48: error: 'mi' was not declared in this scope
int MetadataItem_GetTimestep(MetadataItem* mi)
^~
deepspeech.cpp:90:37: error: 'MetadataItem' was not declared in this scope
float MetadataItem_GetStartTime(MetadataItem* mi)
^~~~~~~~~~~~
deepspeech.cpp:90:51: error: 'mi' was not declared in this scope
float MetadataItem_GetStartTime(MetadataItem* mi)
^~
deepspeech.cpp:125:13: error: 'Metadata' does not name a type
Metadata* finishStreamWithMetadata()
^~~~~~~~
deepspeech.cpp:160:5: error: 'Metadata' does not name a type
Metadata* FinishStreamWithMetadata(StreamWrapper* sw)
^~~~~~~~
deepspeech.cpp: In function 'void FreeString(char*)':
deepspeech.cpp:167:9: error: 'DS_FreeString' was not declared in this scope
DS_FreeString(s);
^~~~~~~~~~~~~
deepspeech.cpp:167:9: note: suggested alternative: 'FreeString'
DS_FreeString(s);
^~~~~~~~~~~~~
FreeString
deepspeech.cpp: At global scope:
deepspeech.cpp:170:23: error: variable or field 'FreeMetadata' declared void
void FreeMetadata(Metadata* m)
^~~~~~~~
deepspeech.cpp:170:23: error: 'Metadata' was not declared in this scope
deepspeech.cpp:170:33: error: 'm' was not declared in this scope
void FreeMetadata(Metadata* m)
It appears that the 0.4.0
version of the DeepSpeech native header that's linked to in the readme does not define a type called Metadata
, however the latest version of the header here does.
I went through the commit history but can't seem to find anywhere where the Metadata
type was removed for 0.4.0
, did you perhaps link to the wrong version of the deepspeech native client in the readme?
This error appears to have been introduced by commit 9feec3f
You're right, the wrong version of Deepseech is indicated in the README. Can you confirm that everything works nicely when you use v0.5.1
?
I can confirm it works with v0.5.1, I've been using this repo with Deepspeech v0.5.1 since I posted the issue 6 days ago with no problems.
Perfect! I've updated the README.md
accordingly.
Thanks for letting me know!