Skip to content

Add audio sample support to AppStream metadata (e.g. for TTS voice previews) #745

Description

@yeager

Summary

AppStream currently supports images and videos in <screenshots>, but has no way to include audio samples. This would be valuable for components where audio is the primary "preview" — most notably text-to-speech (TTS) voices.

Use Case

The Spiel project provides a TTS framework for Linux with installable voice packages distributed via Flatpak. The spiel-installer app lets users browse and install voices, but currently there is no way to preview how a voice sounds before downloading it.

See: project-spiel/spiel-installer#2

Audio previews would let users hear a voice sample before committing to a download — similar to how screenshots let users see an app before installing.

Proposed Solution

Add an <audio> element as a sibling to <image> and <video> within <screenshot>, or introduce a new top-level <samples> element. For example:

Option A: Extend <screenshot> with audio media kind

<screenshots>
  <screenshot type="default">
    <audio type="vorbis" xml:lang="sv">https://example.org/voices/alma_sample.ogg</audio>
    <caption>Swedish female voice sample — "Hej, jag heter Alma"</caption>
  </screenshot>
</screenshots>

This follows the existing pattern where <screenshot> already supports both <image> and <video> elements, and would add AS_SCREENSHOT_MEDIA_KIND_AUDIO alongside the existing image/video kinds.

Option B: New <audio-samples> element

<audio-samples>
  <sample xml:lang="sv" type="vorbis">https://example.org/voices/alma_sample.ogg</sample>
  <sample xml:lang="en" type="vorbis">https://example.org/voices/alma_en_sample.ogg</sample>
</audio-samples>

Benefits

  • TTS voices: Users can preview voice quality, accent, and naturalness
  • Music apps/plugins: Sound fonts, instruments, audio effects could include samples
  • Accessibility: Audio previews complement visual screenshots for users who rely on hearing
  • Codec/media components: Could demonstrate supported formats

Audio Format Considerations

Similar to how videos support multiple containers (WebM, Matroska), audio samples could support:

  • Ogg Vorbis (.ogg) — open, widely supported
  • Opus (.opus) — modern, efficient
  • FLAC (.flac) — lossless option

Short samples (5-15 seconds) would be typical, keeping file sizes small.

Prior Art

  • Video support was added via issue Video as additional metadata #175, extending the screenshot element — a similar approach could work for audio
  • Android and iOS app stores support video previews; some voice assistant marketplaces include audio samples

I would be happy to help with a specification draft or implementation if this is of interest.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions