#ifndef MEETINGRECORDER_H
#define MEETINGRECORDER_H

#include <QObject>
#include <QAudioBuffer>//音频缓存
#include "msgpane.h"
#include "channelmessage.h"
#include <kylin-ai/ai-base/speech.h>
#include "audiorecinfo.h"

class MeetingRecorder : public QObject
{
    Q_OBJECT
public:
    explicit MeetingRecorder(QObject *parent = nullptr);
    ~MeetingRecorder();
    void startMeetingRecord();
    void pauseMeetingRecord();
    void stopMeetingRecord();

signals:
    //todo 参数需要修改成sdk传回的数据结构
    void sigShowSpeech(const QString str);

private:
//    QBuffer m_audioBuffer;
    AudioRecInfo m_audioRecInfo;
    QAudioInput *m_audioInput = nullptr;  // 录音对象
    QAudioFormat m_audioFormat;
    void *session = nullptr;

    void initSession();
    void closeSession();

};

#endif // MEETINGRECORDER_H
