Support windows x86 platform (#86)

* support windows x86 platform

* improve cmake

* resolve comments

---------

Co-authored-by: Jian You (jianyou) <jianyou@cisco.com>
This commit is contained in:
frankyoujian
2023-03-07 16:47:47 +08:00
committed by GitHub
parent da5c80cc74
commit 822e05f169
3 changed files with 34 additions and 14 deletions

View File

@@ -60,9 +60,13 @@ static ModelType GetModelType(char *model_data, size_t model_data_length,
std::unique_ptr<OnlineTransducerModel> OnlineTransducerModel::Create(
const OnlineTransducerModelConfig &config) {
auto buffer = ReadFile(config.encoder_filename);
ModelType model_type = ModelType::kUnkown;
auto model_type = GetModelType(buffer.data(), buffer.size(), config.debug);
{
auto buffer = ReadFile(config.encoder_filename);
model_type = GetModelType(buffer.data(), buffer.size(), config.debug);
}
switch (model_type) {
case ModelType::kLstm: