# com.octavius.audio.describe

> Analyze audio and describe it in structured text.

- Kind: procedure
- Authority: audio.octavius.com
- Lexicon: 1
- Published by [octavia.delve.town](https://lexicon.garden/identity/did:plc:o7bvglqrxnkx2e35g7qrzkmy), not the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:o7bvglqrxnkx2e35g7qrzkmy/com.octavius.audio.describe)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:o7bvglqrxnkx2e35g7qrzkmy/com.octavius.audio.describe/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:o7bvglqrxnkx2e35g7qrzkmy/com.octavius.audio.describe/analytics)

## Procedure (`com.octavius.audio.describe`)

Type: procedure · POST

### Input (application/json)

- `url` (string · uri): A URL to an audio file to analyze.

### Output (application/json)

- `schema` (ref)
  - Reference: `#audioDescription`

## #audioDescription (`com.octavius.audio.describe#audioDescription`)

Type: object

### Properties

- `features` (ref, required)
  - Reference: `#audioFeatures`
- `prose` (string, required): A human-readable multi-line description of the audio.
- `service` (string, required)
  - Constraints: const: "com.octavius.audio.describe"
- `version` (string, required): Ears service version.

## #audioFeatures (`com.octavius.audio.describe#audioFeatures`)

Type: object

### Properties

- `audio` (object)
- `dynamics` (object)
- `key` (object)
- `tempo` (object)
- `texture` (object)
- `timbre` (object)

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "audioDescription": {
      "properties": {
        "features": {
          "ref": "#audioFeatures",
          "type": "ref"
        },
        "prose": {
          "description": "A human-readable multi-line description of the audio.",
          "type": "string"
        },
        "service": {
          "const": "com.octavius.audio.describe",
          "type": "string"
        },
        "version": {
          "description": "Ears service version.",
          "type": "string"
        }
      },
      "required": [
        "service",
        "version",
        "features",
        "prose"
      ],
      "type": "object"
    },
    "audioFeatures": {
      "properties": {
        "audio": {
          "properties": {
            "channels": {
              "type": "integer"
            },
            "duration_seconds": {
              "type": "number"
            },
            "sample_rate": {
              "type": "integer"
            }
          },
          "type": "object"
        },
        "dynamics": {
          "properties": {
            "onset_density_per_second": {
              "type": "number"
            },
            "rms_dynamic_range_db": {
              "type": "number"
            }
          },
          "type": "object"
        },
        "key": {
          "properties": {
            "confidence": {
              "type": "number"
            },
            "mode": {
              "type": "string"
            },
            "name": {
              "type": "string"
            },
            "tonic": {
              "type": "string"
            }
          },
          "type": "object"
        },
        "tempo": {
          "properties": {
            "avg_beat_interval_seconds": {
              "type": "number"
            },
            "beat_count": {
              "type": "integer"
            },
            "bpm": {
              "type": "number"
            },
            "half_time_fold_applied": {
              "type": "boolean"
            }
          },
          "type": "object"
        },
        "texture": {
          "properties": {
            "percussive_share": {
              "type": "number"
            },
            "tonal_share": {
              "type": "number"
            }
          },
          "type": "object"
        },
        "timbre": {
          "properties": {
            "mfcc_mean": {
              "items": {
                "type": "number"
              },
              "type": "array"
            },
            "spectral_centroid_hz": {
              "type": "number"
            },
            "spectral_flatness": {
              "type": "number"
            },
            "spectral_flux": {
              "type": "number"
            },
            "spectral_rolloff_hz": {
              "type": "number"
            },
            "zero_crossing_rate": {
              "type": "number"
            }
          },
          "type": "object"
        }
      },
      "type": "object"
    },
    "main": {
      "description": "Analyze audio and describe it in structured text.",
      "input": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "url": {
              "description": "A URL to an audio file to analyze.",
              "format": "uri",
              "type": "string"
            }
          },
          "required": [],
          "type": "object"
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "ref": "#audioDescription",
          "type": "ref"
        }
      },
      "type": "procedure"
    }
  },
  "description": "Analyze an audio file by URL and return a structured text description (key, tempo, timbre, dynamics). Backed by the alchemicAV Ears HTTP service; agents submit an audio URL and receive the description as text they can reason over.",
  "id": "com.octavius.audio.describe",
  "lexicon": 1
}
```
