> ## Documentation Index
> Fetch the complete documentation index at: https://docs.asakiri.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Media

> Assets: local binary files with technical metadata.

Media represents local binary assets and their technical metadata. An asset owns a file
and facts about it (kind, MIME type, duration, dimensions). Semantic roles belong to
content, not media. "Japanese pronunciation by speaker A" is the meaning of a
content field item; the asset it points at owns the audio file.

## Asset shape

```ts theme={null}
type AssetKind = "audio" | "image" | "video";
type AssetAvailability = "ready" | "placeholder";

interface Asset {
  readonly id: string;
  readonly kind: AssetKind;
  readonly label: string;
  readonly availability: AssetAvailability; // "placeholder" until a file is attached
  readonly file: string | null;             // local storage identity
  readonly expectedFile?: string;
  readonly mimeType: string;
  readonly sha256?: string;                 // digest of the stored file
  readonly byteSize?: number;
  readonly metadata?: Readonly<Record<string, unknown>>; // e.g. duration, dimensions
}
```

<Info>
  Binary data and absolute paths never appear inline in content or lessons. Content and
  compositions reference an asset by its stable **ID**; the asset owns the file.
</Info>

## Integrity

Studio records a `sha256` digest and `byteSize` for every asset that has a local file,
computed **after** the file lands in the project. That ordering matters for images,
because Studio strips EXIF metadata (including GPS) on import, which changes the bytes.
The digest gives players and validators an integrity check, a deduplication key, and a
stable cache key.

## Placeholders

An asset can exist as a `placeholder` before its file is recorded or imported, which lets
authors compose a course and fill in audio or images later. Availability flips to `ready`
once a file is attached.

## Supported formats

Studio recognizes these extensions and maps them to a kind and MIME type:

| Kind | Formats |
| - | - |
| Image | `png`, `jpg`, `jpeg`, `gif`, `webp`, `svg`, `avif` |
| Audio | `mp3`, `m4a`, `aac`, `wav`, `ogg`, `opus`, `flac` |
| Video | `mp4`, `webm`, `mov` |

## Getting audio in

Media can be imported in the Media area or created from any field that accepts an asset.
Studio can also **record audio** in-app or generate speech with **on-device text to
speech**, saving the result as a normal media file. Nothing is uploaded.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.