MCPcopy Create free account
hub / github.com/0xShug0/audio.cpp / create_task_session

Method create_task_session

src/models/qwen3_asr/loader.cpp:101–111  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

99std::unique_ptr<runtime::IVoiceTaskSession> Qwen3ASRLoadedModel::create_task_session(
100 const runtime::TaskSpec & task,
101 const runtime::SessionOptions & options) const {
102 if (task.task != runtime::VoiceTaskKind::Asr) {
103 throw std::runtime_error("Qwen3 ASR only supports the Asr task");
104 }
105 if (task.mode != runtime::RunMode::Offline && task.mode != runtime::RunMode::Streaming) {
106 throw std::runtime_error("Qwen3 ASR supports offline and streaming sessions");
107 }
108 return std::make_unique<Qwen3ASRSession>(task, options, assets_);
109}
110
111std::unique_ptr<Qwen3ASRLoadedModel> load_qwen3_asr_model(const std::filesystem::path & model_path) {
112 auto assets = load_qwen3_asr_assets(model_path);
113 return std::make_unique<Qwen3ASRLoadedModel>(
114 metadata(*assets),

Callers 1

session.cppFile · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected