Documented the transcription bitrate decisions and hardened its fallback

This commit is contained in:
Thorsten Sommer committed 2026-09-19 18:47:16 +02:00
1 parent edfb9a5819
commit 3d0761f243
7 files changed
+35 -5

No files matched your search

@@ -115,6 +115,13 @@ public sealed class DataApp(Expression<Func<Data, DataApp>>? configSelection = n
/// <summary>
/// The Opus bitrate used when normalizing uploaded audio/video for transcription.
/// </summary>
/// <remarks>
/// Every recording is re-encoded to mono Opus before it goes to the transcription provider. That
/// encoding used to be fixed at 32 kbps, which cost the transcription models entire quiet passages:
/// a greeting spoken softly at the start of a recording was simply missing from the transcript. The
/// same recording compared at 64 and 128 kbps came back complete, which is why 128 kbps is the
/// default here. Users trading accuracy for a smaller upload can still pick a lower bitrate.
/// </remarks>
public TranscriptionOpusBitrate OpusBitrate { get; set; } = ManagedConfiguration.Register(configSelection, n => n.OpusBitrate, TranscriptionOpusBitrate.KBPS_128);
/// <summary>
@@ -2,8 +2,13 @@ namespace AIStudio.Settings.DataModel;
public enum TranscriptionOpusBitrate
{
// The recommended bitrate is deliberately the member with the underlying value 0: when the
// settings file holds a value TolerantEnumConverter cannot read, it falls back to that member.
// Landing on the lowest bitrate there would silently reintroduce the very defect this setting
// exists to prevent -- transcripts losing what was said quietly.
KBPS_128 = 0,
KBPS_32,
KBPS_64,
KBPS_128,
KBPS_256,
}
}
@@ -21,6 +21,9 @@ public static class TranscriptionOpusBitrateExtensions
TranscriptionOpusBitrate.KBPS_64 => 64_000,
TranscriptionOpusBitrate.KBPS_128 => 128_000,
TranscriptionOpusBitrate.KBPS_256 => 256_000,
_ => 32_000,
// A value we do not know must never mean the lowest quality: that is how quiet passages
// went missing from transcripts in the first place. Fall back to the recommended bitrate.
_ => 128_000,
};
}
}