fix(audio): expose sample rate setting in Convert Audio (#561)

The Convert Audio tool promised configurable bitrate, sample rate, and channel count, but only format and bitrate were exposed. Adds an optional sampleRate setting (8000 to 96000 Hz, omitted = preserve source) wired through the Zod schema, the FFmpeg -ar flag, the standalone settings panel, and the pipeline builder controls.

Impossible combinations fail loudly instead of degrading silently: MP3 + 96000 Hz is rejected (libmp3lame caps at 48 kHz), and MP3 bitrates above the encoder ceiling at low rates (64 kbps at 8 kHz, 160 kbps at 16/22.05 kHz) are rejected rather than clamped. The UI offers only legal combinations and sanitizes stored pipeline settings on load.

Docs updated in English plus all 20 localized pages with refreshed i18n_source_hash stamps; two new UI strings added to all 21 locales.

Fixes #558
This commit is contained in:
SnapOtter
2026-07-18 10:14:50 +08:00
committed by GitHub
parent 6ecc598fc4
commit d4eaa655b2
47 changed files with 541 additions and 133 deletions
+2
View File
@@ -2489,6 +2489,8 @@ export const ar: TranslationKeys = {
"convert-audio": {
format: "تنسيق الإخراج",
bitrate: "معدل البت (kbps)",
sampleRate: "معدل أخذ العينات (Hz)",
sampleRatePreserve: "الاحتفاظ بالأصلي",
submit: "تحويل",
submitBatch: "تحويل ({count} ملفات)",
progressLabel: "جارٍ التحويل",
+2
View File
@@ -2512,6 +2512,8 @@ export const de: TranslationKeys = {
"convert-audio": {
format: "Ausgabeformat",
bitrate: "Bitrate (kbps)",
sampleRate: "Abtastrate (Hz)",
sampleRatePreserve: "Original beibehalten",
submit: "Konvertieren",
submitBatch: "Konvertieren ({count} Dateien)",
progressLabel: "Wird konvertiert",
+2
View File
@@ -2453,6 +2453,8 @@ export const en = {
"convert-audio": {
format: "Output format",
bitrate: "Bitrate (kbps)",
sampleRate: "Sample rate (Hz)",
sampleRatePreserve: "Preserve original",
submit: "Convert",
submitBatch: "Convert ({count} files)",
progressLabel: "Converting",
+2
View File
@@ -2493,6 +2493,8 @@ export const es: TranslationKeys = {
"convert-audio": {
format: "Formato de salida",
bitrate: "Tasa de bits (kbps)",
sampleRate: "Frecuencia de muestreo (Hz)",
sampleRatePreserve: "Mantener original",
submit: "Convertir",
submitBatch: "Convertir ({count} archivos)",
progressLabel: "Convirtiendo",
+2
View File
@@ -2519,6 +2519,8 @@ export const fr: TranslationKeys = {
"convert-audio": {
format: "Format de sortie",
bitrate: "Débit (kbps)",
sampleRate: "Fréquence d'échantillonnage (Hz)",
sampleRatePreserve: "Conserver l'originale",
submit: "Convertir",
submitBatch: "Convertir ({count} fichiers)",
progressLabel: "Conversion",
+2
View File
@@ -2319,6 +2319,8 @@ export const hi: TranslationKeys = {
"convert-audio": {
format: "आउटपुट फ़ॉर्मैट",
bitrate: "बिटरेट (kbps)",
sampleRate: "सैंपल रेट (Hz)",
sampleRatePreserve: "मूल बनाए रखें",
submit: "कन्वर्ट करें",
submitBatch: "कन्वर्ट करें ({count} फ़ाइलें)",
progressLabel: "कन्वर्ट हो रहा है",
+2
View File
@@ -2502,6 +2502,8 @@ export const id: TranslationKeys = {
"convert-audio": {
format: "Format keluaran",
bitrate: "Bitrate (kbps)",
sampleRate: "Laju sampel (Hz)",
sampleRatePreserve: "Pertahankan asli",
submit: "Konversi",
submitBatch: "Konversi ({count} file)",
progressLabel: "Mengonversi",
+2
View File
@@ -2507,6 +2507,8 @@ export const it: TranslationKeys = {
"convert-audio": {
format: "Formato di output",
bitrate: "Bitrate (kbps)",
sampleRate: "Frequenza di campionamento (Hz)",
sampleRatePreserve: "Mantieni originale",
submit: "Converti",
submitBatch: "Converti ({count} file)",
progressLabel: "Conversione",
+2
View File
@@ -2462,6 +2462,8 @@ export const ja: TranslationKeys = {
"convert-audio": {
format: "出力形式",
bitrate: "ビットレート (kbps)",
sampleRate: "サンプルレート (Hz)",
sampleRatePreserve: "元のまま維持",
submit: "変換",
submitBatch: "変換 ({count} ファイル)",
progressLabel: "変換中",
+2
View File
@@ -2442,6 +2442,8 @@ export const ko: TranslationKeys = {
"convert-audio": {
format: "출력 형식",
bitrate: "비트레이트 (kbps)",
sampleRate: "샘플 레이트 (Hz)",
sampleRatePreserve: "원본 유지",
submit: "변환",
submitBatch: "변환 ({count}개 파일)",
progressLabel: "변환 중",
+2
View File
@@ -2508,6 +2508,8 @@ export const nl: TranslationKeys = {
"convert-audio": {
format: "Uitvoerformaat",
bitrate: "Bitrate (kbps)",
sampleRate: "Samplefrequentie (Hz)",
sampleRatePreserve: "Origineel behouden",
submit: "Converteren",
submitBatch: "Converteren ({count} bestanden)",
progressLabel: "Converteren",
+2
View File
@@ -2506,6 +2506,8 @@ export const pl: TranslationKeys = {
"convert-audio": {
format: "Format wyjściowy",
bitrate: "Przepływność (kbps)",
sampleRate: "Częstotliwość próbkowania (Hz)",
sampleRatePreserve: "Zachowaj oryginalną",
submit: "Konwertuj",
submitBatch: "Konwertuj ({count} plików)",
progressLabel: "Konwertowanie",
+2
View File
@@ -2504,6 +2504,8 @@ export const ptBR: TranslationKeys = {
"convert-audio": {
format: "Formato de saída",
bitrate: "Taxa de bits (kbps)",
sampleRate: "Taxa de amostragem (Hz)",
sampleRatePreserve: "Manter original",
submit: "Converter",
submitBatch: "Converter ({count} arquivos)",
progressLabel: "Convertendo",
+2
View File
@@ -2504,6 +2504,8 @@ export const ru: TranslationKeys = {
"convert-audio": {
format: "Формат вывода",
bitrate: "Битрейт (kbps)",
sampleRate: "Частота дискретизации (Hz)",
sampleRatePreserve: "Сохранить исходную",
submit: "Конвертировать",
submitBatch: "Конвертировать ({count} файлов)",
progressLabel: "Конвертация",
+2
View File
@@ -2501,6 +2501,8 @@ export const sv: TranslationKeys = {
"convert-audio": {
format: "Utdataformat",
bitrate: "Bithastighet (kbps)",
sampleRate: "Samplingsfrekvens (Hz)",
sampleRatePreserve: "Behåll original",
submit: "Konvertera",
submitBatch: "Konvertera ({count} filer)",
progressLabel: "Konverterar",
+2
View File
@@ -2473,6 +2473,8 @@ export const th: TranslationKeys = {
"convert-audio": {
format: "รูปแบบเอาต์พุต",
bitrate: "บิตเรต (kbps)",
sampleRate: "อัตราสุ่มตัวอย่าง (Hz)",
sampleRatePreserve: "คงค่าเดิม",
submit: "แปลง",
submitBatch: "แปลง ({count} ไฟล์)",
progressLabel: "กำลังแปลง",
+2
View File
@@ -2506,6 +2506,8 @@ export const tr: TranslationKeys = {
"convert-audio": {
format: "Çıktı formatı",
bitrate: "Bit hızı (kbps)",
sampleRate: "Örnekleme hızı (Hz)",
sampleRatePreserve: "Orijinali koru",
submit: "Dönüştür",
submitBatch: "Dönüştür ({count} dosya)",
progressLabel: "Dönüştürülüyor",
+2
View File
@@ -2504,6 +2504,8 @@ export const uk: TranslationKeys = {
"convert-audio": {
format: "Вихідний формат",
bitrate: "Бітрейт (kbps)",
sampleRate: "Частота дискретизації (Hz)",
sampleRatePreserve: "Зберегти вихідну",
submit: "Конвертувати",
submitBatch: "Конвертувати ({count} файлів)",
progressLabel: "Конвертація",
+2
View File
@@ -2503,6 +2503,8 @@ export const vi: TranslationKeys = {
"convert-audio": {
format: "Định dạng đầu ra",
bitrate: "Tốc độ bit (kbps)",
sampleRate: "Tần số lấy mẫu (Hz)",
sampleRatePreserve: "Giữ nguyên gốc",
submit: "Chuyển đổi",
submitBatch: "Chuyển đổi ({count} tệp)",
progressLabel: "Đang chuyển đổi",
+2
View File
@@ -2261,6 +2261,8 @@ export const zhCN: TranslationKeys = {
"convert-audio": {
format: "输出格式",
bitrate: "比特率 (kbps)",
sampleRate: "采样率 (Hz)",
sampleRatePreserve: "保留原始",
submit: "转换",
submitBatch: "转换({count} 个文件)",
progressLabel: "正在转换",
+2
View File
@@ -2261,6 +2261,8 @@ export const zhTW: TranslationKeys = {
"convert-audio": {
format: "輸出格式",
bitrate: "位元率 (kbps)",
sampleRate: "取樣率 (Hz)",
sampleRatePreserve: "保留原始",
submit: "轉換",
submitBatch: "轉換({count} 個檔案)",
progressLabel: "正在轉換",