Add WebAssembly for ASR (#604)
This commit is contained in:
@@ -37,7 +37,7 @@ card 3: UACDemoV10 [UACDemoV1.0], device 0: USB Audio [USB Audio]
|
||||
|
||||
and if you want to select card 3 and the device 0 on that card, please use:
|
||||
|
||||
hw:3,0
|
||||
plughw:3,0
|
||||
|
||||
)";
|
||||
|
||||
|
||||
@@ -107,11 +107,12 @@ void OnlineZipformerTransducerModel::InitEncoder(void *model_data,
|
||||
|
||||
if (config_.debug) {
|
||||
auto print = [](const std::vector<int32_t> &v, const char *name) {
|
||||
fprintf(stderr, "%s: ", name);
|
||||
std::ostringstream os;
|
||||
os << name << ": ";
|
||||
for (auto i : v) {
|
||||
fprintf(stderr, "%d ", i);
|
||||
os << i << " ";
|
||||
}
|
||||
fprintf(stderr, "\n");
|
||||
SHERPA_ONNX_LOGE("%s\n", os.str().c_str());
|
||||
};
|
||||
print(encoder_dims_, "encoder_dims");
|
||||
print(attention_dims_, "attention_dims");
|
||||
|
||||
@@ -282,11 +282,12 @@ class OnlineZipformer2CtcModel::Impl {
|
||||
|
||||
if (config_.debug) {
|
||||
auto print = [](const std::vector<int32_t> &v, const char *name) {
|
||||
fprintf(stderr, "%s: ", name);
|
||||
std::ostringstream os;
|
||||
os << name << ": ";
|
||||
for (auto i : v) {
|
||||
fprintf(stderr, "%d ", i);
|
||||
os << i << " ";
|
||||
}
|
||||
fprintf(stderr, "\n");
|
||||
SHERPA_ONNX_LOGE("%s\n", os.str().c_str());
|
||||
};
|
||||
print(encoder_dims_, "encoder_dims");
|
||||
print(query_head_dims_, "query_head_dims");
|
||||
|
||||
@@ -111,11 +111,12 @@ void OnlineZipformer2TransducerModel::InitEncoder(void *model_data,
|
||||
|
||||
if (config_.debug) {
|
||||
auto print = [](const std::vector<int32_t> &v, const char *name) {
|
||||
fprintf(stderr, "%s: ", name);
|
||||
std::ostringstream os;
|
||||
os << name << ": ";
|
||||
for (auto i : v) {
|
||||
fprintf(stderr, "%d ", i);
|
||||
os << i << " ";
|
||||
}
|
||||
fprintf(stderr, "\n");
|
||||
SHERPA_ONNX_LOGE("%s\n", os.str().c_str());
|
||||
};
|
||||
print(encoder_dims_, "encoder_dims");
|
||||
print(query_head_dims_, "query_head_dims");
|
||||
|
||||
@@ -54,10 +54,6 @@ card 3: UACDemoV10 [UACDemoV1.0], device 0: USB Audio [USB Audio]
|
||||
|
||||
and if you want to select card 3 and the device 0 on that card, please use:
|
||||
|
||||
hw:3,0
|
||||
|
||||
or
|
||||
|
||||
plughw:3,0
|
||||
|
||||
as the device_name.
|
||||
|
||||
Reference in New Issue
Block a user