mirror of
https://github.com/mudler/LocalAI.git
synced 2026-10-28 17:18:49 -04:00
chore: ⬆️ Update 0xShug0/audio.cpp to 96269554d00621fb0fca6b52b58919749eba1c8d (#12598)
* ⬆️ Update 0xShug0/audio.cpp Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * fix(audio-cpp): map new detection tasks Upstream adds wake-word and audio-classification task kinds. Preserve their capability names without routing them to unrelated audio RPCs. Assisted-by: Codex:gpt-6 --------- Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: mudler <2420543+mudler@users.noreply.github.com> Co-authored-by: localai-org-maint-bot <306269227+localai-org-maint-bot@users.noreply.github.com>
This commit is contained in:
6 files changed
+39
-3
No files matched your search
@@ -90,6 +90,11 @@ static_assert(kMirror(Task::Svc) == 12, "Task drifted from VoiceTaskKind");
|
||||
static_assert(kMirror(Task::Midi) == 13, "Task drifted from VoiceTaskKind");
|
||||
static_assert(kMirror(Task::TurnDetection) == 14, "Task drifted from VoiceTaskKind");
|
||||
|
||||
static_assert(kEngine(engine::runtime::VoiceTaskKind::WakeWord) == 15);
|
||||
static_assert(kEngine(engine::runtime::VoiceTaskKind::AudioClassification) == 16);
|
||||
static_assert(kMirror(Task::WakeWord) == 15);
|
||||
static_assert(kMirror(Task::AudioClassification) == 16);
|
||||
|
||||
static_assert(static_cast<int>(engine::runtime::RunMode::Offline) == 0, "RunMode drifted");
|
||||
static_assert(static_cast<int>(engine::runtime::RunMode::Streaming) == 1,
|
||||
"engine::runtime::RunMode gained, lost or reordered a member. "
|
||||
@@ -248,6 +253,8 @@ engine::runtime::VoiceTaskKind to_engine_task(Task task) {
|
||||
case Task::Svc: return K::Svc;
|
||||
case Task::Midi: return K::Midi;
|
||||
case Task::TurnDetection: return K::TurnDetection;
|
||||
case Task::WakeWord: return K::WakeWord;
|
||||
case Task::AudioClassification: return K::AudioClassification;
|
||||
}
|
||||
// Unreachable for any valid enumerator. No `default:` label, so -Wswitch
|
||||
// still reports a member this switch stops covering.
|
||||
@@ -272,6 +279,8 @@ Task from_engine_task(engine::runtime::VoiceTaskKind kind) {
|
||||
case K::Svc: return Task::Svc;
|
||||
case K::Midi: return Task::Midi;
|
||||
case K::TurnDetection: return Task::TurnDetection;
|
||||
case K::WakeWord: return Task::WakeWord;
|
||||
case K::AudioClassification: return Task::AudioClassification;
|
||||
}
|
||||
return Task::Vad;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user