Skip to content

Add audio kind (music / speech / sound effect) and skip transcribing music - #49

Merged
davior merged 1 commit into
mainfrom
claude/admiring-planck-ggdijx
Oct 26, 2026
Merged

davior merged 1 commit into
mainfrom
claude/admiring-planck-ggdijx

Conversation

@davior

@davior davior commented Oct 26, 2026

Copy link
Copy Markdown
Owner

Every audio upload was sent to Deepgram when a key was configured, so music was billed per minute and transcribed to nothing. Voice recordings still need their transcripts, so this PR adds a label saying what an audio file is, and transcription follows that label.

audio_kind on audio assets

music, speech, sfx, or NULL for not known. One nullable column; existing rows stay NULL.

Kind Set by Transcribed on upload Analysed (tempo/key/energy)
music A genre or BPM tag; a music page import; by hand No Yes
speech A speech-genre tag (Podcast, Speech, Spoken Word, Audiobook, …); by hand Yes No
sfx By hand No No
not known Anything else Yes, as before Yes
  • Unknown is transcribed on purpose. A voice recording losing its transcript is the costly mistake, so only a confident kind skips transcription.
  • The kind is never guessed from the sound. A podcast over a music bed has a beat and a key.
  • It is decided at upload, from tags or from the importer, because transcription is queued the moment a file lands. Page import passes audio_kind="music" to ingest_file so the kind is on the row before that decision.
  • "This is" in the Music tab changes the kind by hand. A change catches up on what upload would have done: marking a file as speech transcribes it if it never was; marking it as music measures it. Nothing is undone, and the Transcribe button still works on any kind.
  • Only audio assets can have a kind. Setting one on a video returns 400 not_audio.
  • When page import finds a duplicate by checksum, it sets the existing copy to music if that copy has no kind yet.

A follow-up in gvc will let Video Creator prefer music and skip speech when choosing a soundtrack.

Testing

  • pytest -q: 1385 passed. The new tests/test_audio_kind.py covers:
    • the tag rules;
    • that a tagged song isn't transcribed while an untagged recording still is;
    • kind changes catching up;
    • a podcast-tagged file not being analysed as music;
    • video refusal and invalid values;
    • page import.
  • npm run format:check, npm run lint, npm test (426 passed) and npm run build all clean.

Generated by Claude Code

…music

Uploads of music no longer go to Deepgram, while voice recordings still do.
audio_kind on audio assets, NULL when not known:

- Set at upload from tags (a speech genre means speech; any other genre
  or a BPM means music), by a music page import (always music), or by
  hand in the Music tab. Never guessed from the sound.
- Transcription is skipped only for music and sound effects; unknown is
  transcribed exactly as before. Music analysis skips speech and sfx.
- Changing it catches up: speech transcribes an untranscribed file, music
  measures it. The Transcribe button still works on any kind.
- A duplicate found by checksum on page import gains kind "music" if blank.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DCL4jm6ogZBBhnjEfBBaXU
davior pushed a commit to davior/gvc that referenced this pull request Oct 26, 2026
GAM now records what an audio file is (davior/gam#49). GVC reads it:

- GamAssetRead.audio_kind: music, speech or sfx; null when not known or
  against a GAM without it, and for any value GVC does not recognise.
- search_assets and get_asset include it as "kind", and the prompt says
  to use music (or a plainly musical unknown) for a soundtrack, never
  speech, with sfx for sound effects.
- The Sound picker leads its summary line with "Speech" or "Sound
  effect", so a voice memo stands out in a list of tracks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DCL4jm6ogZBBhnjEfBBaXU
@davior
davior marked this pull request as ready for review October 26, 2026 12:24
@davior
davior merged commit 3e51082 into main Oct 26, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants