mirror of
https://github.com/hanzoai/frames.git
synced 2026-09-24 00:08:03 +00:00
Voice is POST /v1/audio/speech and word timings come from POST /v1/audio/transcriptions over the rendered audio. Music, sound effects, images, and video generate through /v1/audio/music, /v1/audio/foley, /v1/images/generations, and /v1/videos/generations. The shared catalog is a listing under media/<type>/ in our own object store, browsed through /v1/s3 — an empty prefix reports itself as empty rather than reading as a bad query. One client (scripts/lib/api.mjs) holds every route and the one credential: a Hanzo IAM token in $HANZO_API_KEY, read from Hanzo KMS. No credential file, no per-repo .env, no per-provider CLI to install or keep current. $HANZO_BASE_URL points the same code at a local Hanzo Engine. Word timings are passed through, never interpolated: a caption cut on invented boundaries reads as correct and drifts against the voice. When the service returns text without them, the word array is empty and the caller is told. Deletes the provider cascade this replaces, its model ladders, and the account linking in telemetry — the install id stands alone.
13 lines
349 B
JavaScript
13 lines
349 B
JavaScript
import { asResult, compose, find } from "./catalog.mjs";
|
|
|
|
export const sfxProvider = {
|
|
async search(intent) {
|
|
const hit = await find("sfx", intent);
|
|
if (!hit || hit.empty) return null;
|
|
return asResult(hit, intent, "sfx");
|
|
},
|
|
async generate(intent, ctx) {
|
|
return compose(intent, { kind: "sfx", seconds: ctx?.seconds });
|
|
},
|
|
};
|