Add C++ API for streaming ASR. (#1455)

It is a wrapper around the C API.
This commit is contained in:
Fangjun Kuang
2024-10-23 12:07:43 +08:00
committed by GitHub
parent 3edd8d7cf6
commit effd5ef2be
72 changed files with 729 additions and 83 deletions

View File

@@ -45,7 +45,7 @@ class CStreamingSpeechRecognitionDlg : public CDialogEx {
private:
Microphone mic_;
SherpaOnnxOnlineRecognizer *recognizer_ = nullptr;
const SherpaOnnxOnlineRecognizer *recognizer_ = nullptr;
PaStream *pa_stream_ = nullptr;
RecognizerThread *thread_ = nullptr;
@@ -54,7 +54,7 @@ class CStreamingSpeechRecognitionDlg : public CDialogEx {
public:
bool started_ = false;
SherpaOnnxOnlineStream *stream_ = nullptr;
const SherpaOnnxOnlineStream *stream_ = nullptr;
public:
int RunThread();
@@ -79,4 +79,4 @@ class RecognizerThread : public CWinThread {
private:
CStreamingSpeechRecognitionDlg *dlg_;
};
};