Commit 4521711f authored by mayong's avatar mayong
Browse files

Merge branch 'main' of https://github.com/RapidAI/RapidASR

# Conflicts:
#	cpp_onnx/src/paraformer_onnx.cpp
parents cedd2118 ece73c89
......@@ -3,6 +3,11 @@
本程序中的预处理及后处理代码,来自于:https://github.com/chenkui164/FastASR
## 演示
![Windows演示](images/demo.png "Windows ASR")
## 注意
本程序只支持 采样率16000hz, 位深16bit的 **单声道** 音频。
......
......@@ -145,13 +145,22 @@ string ModelImp::forward(float* din, int len, int flag)
try {
auto outputTensor = m_session->Run(run_option, m_szInputNames.data(), input_onnx.data(), m_szInputNames.size(), m_szOutputNames.data(), m_szOutputNames.size());
<<<<<<< .mine
=======
>>>>>>> .theirs
std::vector<int64_t> outputShape = outputTensor[0].GetTensorTypeAndShapeInfo().GetShape();
int64_t outputCount = std::accumulate(outputShape.begin(), outputShape.end(), 1, std::multiplies<int64_t>());
float* floatData = outputTensor[0].GetTensorMutableData<float>();
auto encoder_out_lens = outputTensor[1].GetTensorMutableData<int64_t>();
<<<<<<< .mine
=======
>>>>>>> .theirs
result = greedy_search(floatData, *encoder_out_lens);
}
catch (...)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment