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 serverGuideCurrent implementations
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/v1transcribe_audio_to_midi with mode monophonic, polyphonic or drumsAudio to MIDI in a moduleBasic Pitch (polyphonic), Pitchy (monophonic, no model), Inverse Drum Machine (drums)
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—None yet: jobs are refused before execution

The implementation column describes what hosts run today. Inspect the task's state in the face, or maru.audio.capabilities() from an app, for what a host actually offers right now; a catalog entry alone does not mean a model is online.

Where tasks are available

HostGenerate audioAudio to MIDI, stems, clip analysisCamera control
Website module pagesOn this device (WebGPU browsers) and hosted, for admitted accountsYesYes
module:dev workbenchTest runtime, this device, and hosted through a configured proxyNot establishedYes
Studio preview, desktop StudioNot yetNot established—
Native plug-ins (VST3, AU, CLAP)Not yet: factory and saved takes playNot yet—
Mobile and hardware targetsNoNoNo

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

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 Stable Audio output terms are still under review; check the model page before you sell a module whose factory content was generated.

Further reading