Add non-streaming ASR (#92)

This commit is contained in:
Fangjun Kuang
2023-03-26 08:53:42 +08:00
committed by GitHub
parent 6f92bc7362
commit 5572246253
48 changed files with 1526 additions and 150 deletions

View File

@@ -13,17 +13,17 @@ namespace sherpa_onnx {
/** Read a wave file with expected sample rate.
@param filename Path to a wave file. It MUST be single channel, PCM encoded.
@param expected_sample_rate Expected sample rate of the wave file. If the
sample rate don't match, it throws an exception.
@param filename Path to a wave file. It MUST be single channel, 16-bit
PCM encoded.
@param sampling_rate On return, it contains the sampling rate of the file.
@param is_ok On return it is true if the reading succeeded; false otherwise.
@return Return wave samples normalized to the range [-1, 1).
*/
std::vector<float> ReadWave(const std::string &filename,
float expected_sample_rate, bool *is_ok);
std::vector<float> ReadWave(const std::string &filename, int32_t *sampling_rate,
bool *is_ok);
std::vector<float> ReadWave(std::istream &is, float expected_sample_rate,
std::vector<float> ReadWave(std::istream &is, int32_t *sampling_rate,
bool *is_ok);
} // namespace sherpa_onnx