-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into aa/precommit
- Loading branch information
Showing
22 changed files
with
797 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
#pragma once | ||
|
||
#include "Module.h" | ||
|
||
// size of audio to process should be a parameter. | ||
// Cache variable to collect frames for processing | ||
|
||
class AudioToTextXFormProps : public ModuleProps | ||
{ | ||
public: | ||
enum DecoderSamplingStrategy { | ||
GREEDY, | ||
BEAM_SEARCH | ||
}; | ||
|
||
DecoderSamplingStrategy samplingStrategy; | ||
std::string modelPath; | ||
int bufferSize; | ||
|
||
AudioToTextXFormProps( | ||
DecoderSamplingStrategy _samplingStrategy, | ||
std::string _modelPath, | ||
int _bufferSize); | ||
size_t getSerializeSize(); | ||
|
||
|
||
private: | ||
friend class boost::serialization::access; | ||
|
||
template <class Archive> | ||
void serialize(Archive& ar, const unsigned int version); | ||
}; | ||
|
||
class AudioToTextXForm : public Module | ||
{ | ||
|
||
public: | ||
AudioToTextXForm(AudioToTextXFormProps _props); | ||
virtual ~AudioToTextXForm(); | ||
bool init(); | ||
bool term(); | ||
void setProps(AudioToTextXFormProps& props); | ||
AudioToTextXFormProps getProps(); | ||
|
||
protected: | ||
bool process(frame_container& frames); | ||
bool processSOS(frame_sp& frame); | ||
bool validateInputPins(); | ||
bool validateOutputPins(); | ||
void addInputPin(framemetadata_sp& metadata, string& pinId); | ||
bool handlePropsChange(frame_sp& frame); | ||
|
||
private: | ||
void setMetadata(framemetadata_sp& metadata); | ||
class Detail; | ||
boost::shared_ptr<Detail> mDetail; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.