AI tasks in your module

Use generation, transcription, separation, rhythm and analysis as host tasks: declare the task, let the host run whichever model and runtime it supports, and keep the module working when a task is unavailable.

A module asks for a task, such as "generate a take", "turn this clip into MIDI" or "split these stems". It never names a model or runs one. The host chooses an implementation it supports (on this device, on Maru's servers, or through a provider), runs it outside the audio callback, and hands the result back through the module's existing contracts.

Because tasks are separate from models, the implementation behind a task can change without changing your module. A faster model, a new provider or a local runtime arrives as another option on the host, not as an SDK migration. The model directory describes the models themselves; AI for music explains why Maru works on these tasks. For what each task is good for, its limits and ideas to build, start with AI tasks in the Help Center.

How a task reaches your module

  1. Declare it. List the task's host capability as optional in the module's UI options, and declare any resource slots the result is installed into.
  2. Read it from the face. The host passes a task surface as a face prop: display-safe state (status, progress, takes, notes) and intent methods (generate, select, cancel). The face never sees tokens, URLs or model files.
  3. Handle "not here". A host without the task omits the prop. Keep the module's ordinary controls, factory sounds and saved results usable.
ts
ui: {
  entry: "./ui/index.tsx",
  hostCapabilities: { optional: ["audio.generation/v1"] },
},

Inference always runs beside the audio path. A Processor only ever receives ordinary data (a sample buffer, MIDI notes, a parameter) through the same resource and event contracts it already uses.

Tasks

TaskIn a module faceFrom an app or serverGuideImplementations
Generate audioaudio.generation/v1 (takes installed into the Processor) or app.generation/v1 (takes saved to the person's library)generate_audio jobGenerate audio in a moduleStable Audio 3 Small, Stable Audio 3 Medium
Audio to MIDIaudio.transcription/v1; audio.transcription.pitch/v1 selects the finite pitch profiletranscribe_audio_to_midi with mode monophonic, polyphonic or drumsAudio to MIDI in a moduleBasic Pitch (polyphonic), Pitchy (monophonic, no model), Inverse Drum Machine (drums)
Live audio to MIDIaudio.transcription.live/v1 (notes played into the Processor's note input)—Live audio to MIDIPitchy (monophonic, no model)
Separate stemsaudio.separation/v1separate_audio_stemsSeparate stems in a moduleSpleeter (device), SCNet (server)
Beats and tempoBeat grid through audio.separation/v1 (trackRhythm); model-free onsets from @maruaudio/audio-sdk/analysis/noveltyanalyze_audio with tempo, or rhythm alone for a beat gridBeats and tempo in a moduleBeat This (beats and downbeats)
Analyse a clipaudio.clip-analysis/v1analyze_audioAdd generative audio to your appModel-free loudness, sections and quality
Camera controlvision.hand-landmarks/v1, vision.face-landmarks/v1, vision.pose-landmarks/v1, vision.hand-gestures/v1—Camera control in a moduleMediaPipe landmark models
Transcribe speech—transcribe_speech—A host without a speech model refuses jobs before execution

The implementation column names the runtimes behind each task. Inspect the task's state in the face, or maru.audio.capabilities() from an app, for what a host offers; a catalog entry alone does not mean a model is online.

One host contract per task

Each task, and each mode of a task such as clip or live, has one host contract: the capability a module declares, the face prop the host fills, the input the host prepares, what comes back and how it reaches the Processor. Every host reads the same contract, so a module written against it works in any host that offers the task, and a new engine or model reaches it without a change to the module. To write an engine for a task, declare the model files it needs or run engines in your own host, read Implement an ML task engine.

Where tasks are available

A module with an optional task capability runs on every target; the task appears where a host supports it.

Website module pages run these tasks: generation on this device in WebGPU browsers and hosted for admitted accounts, plus audio to MIDI, stems, clip analysis and camera control. Live audio to MIDI appears in each host that carries audio.transcription.live/v1. The module:dev workbench offers camera control and generation through a test runtime, this device or a configured hosted proxy. Native plug-ins (VST3, AU, CLAP) play factory and saved takes. Mobile and hardware targets do not run these tasks.

The finite pitch-transcription carrier has a separate browser scope: local maru dev, Studio built previews and standalone maru.page hosts. See Pitch detection and audio-to-MIDI for the required toolkit release, exact profile declaration and validation matrix. This does not establish availability for other transcription tasks, the immediate draft Face tab, desktop Studio or native plug-ins. Microphone capture is optional and depends on a host-owned input service.

Choose an architecture or training workflow

Start with the artifact your task must return: label scores, PCM audio, note events or text. A shared Python library is useful for experiments, but it does not make those contracts interchangeable. Several heads can reuse one audio encoder; an audio-language model additionally needs a trained connection between audio features and its language backbone.

For concrete exercises, compare the architectures in How models see audio, adapt a sound generator with Training on your own sounds, or prepare MIDI tokens with Generating notes. The model directory's tools tab links the external training and serving tools. For reference workflows, a MIDI round-trip example, dataset splits and a copyable run record, use Run an audio or MIDI model experiment.

vLLM-Omni is a candidate for serving supported multimodal stages together. It does not train them, merge arbitrary checkpoints or establish a Maru integration. Verify reference inference for the exact model before comparing serving backends. Keep training and inference in the existing host service or worker boundary, with prepared results crossing into the module through its declared task contracts.

Licences and attribution

Each implementation carries its own licence. A face's generation state reports each model's licence string, and the model directory records the terms Maru has reviewed. Some open models are licensed for non-commercial use only, and Maru has not confirmed the output terms for Stable Audio; check the model page before you sell a module whose factory content was generated.

Further reading