Skip to content

Commit 4058194

Browse files
localai-botmudlerlocalai-org-maint-bot
authored
chore: ⬆️ Update 0xShug0/audio.cpp to 3407559d7c83b543bd60ca8fa2b630374e71083f (#11474)
* ⬆️ Update 0xShug0/audio.cpp Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * fix(audio-cpp): map the MIDI task audio.cpp now appends MIDI to its task enum. Keep the LocalAI mirror and conversion switches aligned so the backend builds against the new pin. Assisted-by: Codex:gpt-5 --------- 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>
1 parent 6d4c64c commit 4058194

5 files changed

Lines changed: 9 additions & 3 deletions

File tree

backend/cpp/audio-cpp/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
# recipe is a make target (not a prepare.sh) so 'make purge && make' is a clean
1010
# rebuild and so the bump bot can see the pin.
1111

12-
AUDIO_CPP_VERSION?=9d6e7b39236e0151ad28a70fab0d538b84ce8718
12+
AUDIO_CPP_VERSION?=3407559d7c83b543bd60ca8fa2b630374e71083f
1313
AUDIO_CPP_REPO?=https://github.com/0xShug0/audio.cpp
1414

1515
CURRENT_MAKEFILE_DIR := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))

backend/cpp/audio-cpp/capability_routing.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ const NamedTask kTaskNames[] = {
2929
{Task::VoiceDesign, "vdes"},
3030
{Task::SpeakerRecognition, "spk"},
3131
{Task::Svc, "svc"},
32+
{Task::Midi, "midi"},
3233
};
3334

3435
// Accepted on input but never emitted. "spkrec" was this backend's own earlier

backend/cpp/audio-cpp/capability_routing.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ enum class Task {
2525
VoiceDesign,
2626
SpeakerRecognition,
2727
Svc,
28+
Midi,
2829
};
2930

3031
// Mirrors engine::runtime::RunMode.

backend/cpp/audio-cpp/capability_routing_test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ static void test_names_round_trip() {
361361
Task::SourceSeparation, Task::AudioGeneration, Task::Tts,
362362
Task::VoiceCloning, Task::VoiceConversion,
363363
Task::SpeechToSpeech, Task::Alignment, Task::VoiceDesign,
364-
Task::SpeakerRecognition, Task::Svc};
364+
Task::SpeakerRecognition, Task::Svc, Task::Midi};
365365
for (const Task t : all) {
366366
Task parsed = Task::Vad;
367367
const bool ok = parse_task_name(task_name(t), parsed);

backend/cpp/audio-cpp/loaded_model.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@ static_assert(kEngine(engine::runtime::VoiceTaskKind::VoiceDesign) == 10, "Voice
6969
static_assert(kEngine(engine::runtime::VoiceTaskKind::SpeakerRecognition) == 11, "VoiceTaskKind drifted");
7070
// The last member. Pinning it pins the member count too, as long as the
7171
// enumerators stay contiguous and unassigned, which upstream's declaration is.
72-
static_assert(kEngine(engine::runtime::VoiceTaskKind::Svc) == 12,
72+
static_assert(kEngine(engine::runtime::VoiceTaskKind::Svc) == 12, "VoiceTaskKind drifted");
73+
static_assert(kEngine(engine::runtime::VoiceTaskKind::Midi) == 13,
7374
"engine::runtime::VoiceTaskKind gained, lost or reordered a member. "
7475
"audiocpp_backend::Task mirrors it positionally: update capability_routing.h, "
7576
"to_engine_task and from_engine_task together, then move this pin.");
@@ -87,6 +88,7 @@ static_assert(kMirror(Task::Alignment) == 9, "Task drifted from VoiceTaskKind");
8788
static_assert(kMirror(Task::VoiceDesign) == 10, "Task drifted from VoiceTaskKind");
8889
static_assert(kMirror(Task::SpeakerRecognition) == 11, "Task drifted from VoiceTaskKind");
8990
static_assert(kMirror(Task::Svc) == 12, "Task drifted from VoiceTaskKind");
91+
static_assert(kMirror(Task::Midi) == 13, "Task drifted from VoiceTaskKind");
9092

9193
static_assert(static_cast<int>(engine::runtime::RunMode::Offline) == 0, "RunMode drifted");
9294
static_assert(static_cast<int>(engine::runtime::RunMode::Streaming) == 1,
@@ -241,6 +243,7 @@ engine::runtime::VoiceTaskKind to_engine_task(Task task) {
241243
case Task::VoiceDesign: return K::VoiceDesign;
242244
case Task::SpeakerRecognition: return K::SpeakerRecognition;
243245
case Task::Svc: return K::Svc;
246+
case Task::Midi: return K::Midi;
244247
}
245248
// Unreachable for any valid enumerator. No `default:` label, so -Wswitch
246249
// still reports a member this switch stops covering.
@@ -263,6 +266,7 @@ Task from_engine_task(engine::runtime::VoiceTaskKind kind) {
263266
case K::VoiceDesign: return Task::VoiceDesign;
264267
case K::SpeakerRecognition: return Task::SpeakerRecognition;
265268
case K::Svc: return Task::Svc;
269+
case K::Midi: return Task::Midi;
266270
}
267271
return Task::Vad;
268272
}

0 commit comments

Comments
 (0)