Use struct typedefs for C compatibility;
This commit is contained in:
parent
5d24f19115
commit
73b2bbe8da
@ -15,24 +15,24 @@ extern "C" {
|
|||||||
#define DEEPSPEECH_EXPORT
|
#define DEEPSPEECH_EXPORT
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
struct ModelState;
|
typedef struct ModelState ModelState;
|
||||||
|
|
||||||
struct StreamingState;
|
typedef struct StreamingState StreamingState;
|
||||||
|
|
||||||
// Stores each individual character, along with its timing information
|
// Stores each individual character, along with its timing information
|
||||||
struct MetadataItem {
|
typedef struct MetadataItem {
|
||||||
char* character;
|
char* character;
|
||||||
int timestep; // Position of the character in units of 20ms
|
int timestep; // Position of the character in units of 20ms
|
||||||
float start_time; // Position of the character in seconds
|
float start_time; // Position of the character in seconds
|
||||||
};
|
} MetadataItem;
|
||||||
|
|
||||||
// Stores the entire CTC output as an array of character metadata objects
|
// Stores the entire CTC output as an array of character metadata objects
|
||||||
struct Metadata {
|
typedef struct Metadata {
|
||||||
MetadataItem* items;
|
MetadataItem* items;
|
||||||
int num_items;
|
int num_items;
|
||||||
// Approximated probability (confidence value) for this transcription.
|
// Approximated probability (confidence value) for this transcription.
|
||||||
double probability;
|
double probability;
|
||||||
};
|
} Metadata;
|
||||||
|
|
||||||
enum DeepSpeech_Error_Codes
|
enum DeepSpeech_Error_Codes
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user