#4366

fix(ai): meter converted audio from reported output duration

OpenSalazareowants to merge intofrom

Use reported transcription duration and measured converted-audio output for usage, with estimates when actual duration is unavailable. Reuse settled add-on totals for budget checks.

Billing behavior changes. Provider calls are covered at the external client boundary; no live provider calls were made.

Validation on this isolated branch: 296 backend tests across 3 suites. git diff --check passed.

Activity

4
github-actions[bot]3d ago

Coverage Report

StatusCategoryPercentageCovered / Total
🔵Lines94.96%
⬇️ -0.01 pp
38935 / 40999
🔵Statements93.13%
⬇️ -0.01 pp
42766 / 45918
🔵Functions92.42%
⬇️ -0.08 pp
7381 / 7986
🔵Branches84.43%
⬇️ -0.04 pp
29918 / 35433
File Coverage
FileStmtsBranchesFunctionsLinesUncovered Lines
Changed Files
src/backend/drivers/ai-speech2speech/VoiceChangerDriver.ts97.05%
⬆️ +1.00 pp
87.95%
⬆️ +1.80 pp
100%
🟰 ±0 pp
96.9%
⬆️ +1.01 pp
151-153, 184-186, 195-197
src/backend/drivers/ai-speech2txt/providers/openai/OpenAISpeechToTextProvider.ts96.92%
⬆️ +0.31 pp
89.85%
⬆️ +0.97 pp
100%
🟰 ±0 pp
96.61%
⬆️ +0.32 pp
159-163, 166-170
src/backend/drivers/ai-tts/providers/elevenlabs/ElevenLabsTTSProvider.ts100%
🟰 ±0 pp
90.9%
🟰 ±0 pp
100%
🟰 ±0 pp
100%
🟰 ±0 pp
src/backend/services/metering/MeteringService.ts93.83%
🟰 ±0 pp
90.49%
🟰 ±0 pp
95.9%
🟰 ±0 pp
95.28%
🟰 ±0 pp
401, 412, 420-421, 435, 484, 732-751, 966-968, 1119, 1276-1278, 1290, 1429-1431, 1547, 1607-1611, 1663, 1798-1799, 1814, 1873-1874, 1921-1922, 1939, 1965-1966, 2083-2084, 2163-2172, 2255, 2269-2270, 2401, 2490, 2537-2539, 2742, 2757-2758
Generated in workflow #2992 for commit fd4f22e by the Vitest Coverage Report Action