Configurable low_freq high_freq, dithering (#664)

This commit is contained in:
Karel Vesely
2024-03-22 14:41:44 +01:00
committed by GitHub
parent 2fc1201924
commit eaec4c83c2
10 changed files with 96 additions and 15 deletions

View File

@@ -403,7 +403,10 @@ OnlineZipformer2TransducerModel::GetEncoderInitStates() {
}
{
std::array<int64_t, 4> s{1, 128, 3, 19};
SHERPA_ONNX_CHECK_NE(feature_dim_, 0);
int32_t embed_dim = (((feature_dim_ - 1) / 2) - 1) / 2;
std::array<int64_t, 4> s{1, 128, 3, embed_dim};
auto v = Ort::Value::CreateTensor<float>(allocator_, s.data(), s.size());
Fill(&v, 0);
ans.push_back(std::move(v));