Compare commits

..
Author SHA1 Message Date
Andrew Beveridge ☄️andClaude Opus 4.8 40c7960854 fix(tenant): stage instrumental for the GCE encoder + daily tenant E2E (#828)
@coderabbitai ignore

## Final render blocker (bug #8)

With #824/#825/#826/#827, tenant jobs now render the karaoke video — but
the GCE encoder failed with **"No instrumental audio found"**.

**Root cause:** the user-supplied instrumental lives under
`uploads/{job}/audio/`, but the encoder only pulls input from
`jobs/{job}/` (`input_gcs_path`) and locates the instrumental via
`find_file("*existing_instrumental*", "*Instrumental User*")`. On top of
that, the running encoder VM (`encoding-worker-b`) boots a **2026-01-23
image** that predates the encoder's own `existing_instrumental`
config-download path (added 2026-03-04), so it could never fetch it from
`uploads/` either.

**Fix (image-agnostic — no risky shared-VM recreation, no consumer
impact):** `_encode_via_gce` server-side copies the instrumental into
`jobs/{job_id}/existing_instrumental.<ext>` before submitting. The
encoder downloads `jobs/{job}/` and its **recursive** `find_file` then
locates it on any image version. Added `StorageService.copy_blob` + unit
test.

> Note: the stale encoder VM image is a separate infra item — the
`encoding-worker` VMs should be recreated from the image family's newest
image (which has 3 months of encoder fixes). Tracked for a Pulumi pass;
not required for this fix.

## Daily tenant E2E (second ask)
- `scripts/e2e/tenant_e2e.py` — full per-tenant prod health check:
submit → approve review → render → assert (completes, Dropbox link
present, no YouTube, downloads available) → clean up job + uploads.
- `.github/workflows/e2e-tenant-daily.yml` — daily matrix (vocalstar,
singa), WIF auth, Discord + email on failure.
- `docs/archive/2026-06-15-tenant-portals-e2e.md` — the full story (8
bugs, all fixed).

## Testing
- `copy_blob` unit test; storage suite green (20).
- Full tenant E2E re-run to completion after deploy.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-15 06:49:46 -04:00
Andrew Beveridge ☄️andClaude Opus 4.8 d6bd2f1787 fix(tenant): complete the render for jobs that supply their own instrumental (#827)
@coderabbitai ignore

## Two final render blockers (found by the Vocal Star E2E)

With attribution (#824), the audio slot (#825), and transcription
padding (#826) fixed, the first real tenant job advanced through
transcription → screens → review → render, surfacing the last two
never-exercised issues:

### 1. Render prerequisites — "No instrumental selected"
existing-instrumental jobs (every tenant submission) have no
instrumental-selection UI step, so `instrumental_selection` was never
written to state_data. The video orchestrator then defaults to `'clean'`
(a separated stem that was never produced for these jobs), and
`_validate_prerequisites` rejects the job, leaving it stuck retrying.

**Fix:** `complete-review` now defaults `instrumental_selection` to
`'custom'` (use the provided instrumental) when
`existing_instrumental_gcs_path` is set. An explicit request value still
wins. The render path already supports `'custom'`.

### 2. Theme asset paths (reproducibility)
The tenant setup scripts wrote full `gs://bucket/themes/.../assets/X`
URLs, but `theme_service._build_style_assets_mapping` only resolves bare
basenames (the consumer convention). With `gs://` URLs, `style_assets`
came back empty → assets never downloaded → encoder failed with "Video
background image not found". Scripts now emit basenames, and add the
newly-required `extra_text_text_transform` field the strict theme
validator expects.

(The two live GCS themes — vocalstar, singa — were corrected out-of-band
to match.)

## Testing
- New regression tests: complete-review defaults to `custom` for
existing-instrumental jobs; explicit selection still wins.
- Review suites green (102). Full E2E re-run to completion after deploy.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-15 05:34:20 -04:00
Andrew Beveridge ☄️andClaude Opus 4.8 c94a5b8754 fix(audioshake): remux user audio with leading null padding before transcription (#826)
@coderabbitai ignore

## Problem (found by the real Vocal Star E2E)

After #824/#825, the first real Vocal Star job reached transcription but
**AudioShake rejected the asset**: `400 ... "Error fetching or
processing asset"`.

Root cause: the supplied MP3 — and **Vocal Star's entire bulk batch** —
begins with ~731 leading `0x00` bytes before the first ID3/MPEG frame.
`ffmpeg`/`ffprobe` tolerate it (the audio decodes fine), but
AudioShake's asset processing does not.

Consumer jobs never hit this because their audio is re-encoded into
clean stems by the separator before transcription. Tenant /
existing-instrumental jobs upload the user's **raw** file straight to
AudioShake.

## Fix
`AudioUploadOptimizer.prepare_for_upload` now detects leading null
padding on padding-prone compressed formats (`.mp3/.aac/.mp4a` — **not**
container formats like `.mp4/.mov`, which legitimately start with a null
box-size prefix) and **losslessly remuxes** (`ffmpeg -c copy`, no
re-encode) before upload.

## Verified against the real AudioShake API
- padded file → `create_task` **400** ("Error fetching or processing
asset")
- remuxed file (same upload path) → `create_task` **200** ✓

Regression tests added (detection + routing + container-format safety).

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-15 04:12:22 -04:00
Andrew Beveridge ☄️andClaude Opus 4.8 829ff02bdb fix(tenant): transcribe the mixed audio, not the supplied instrumental (#825)
@coderabbitai ignore

## Problem (found by the first real tenant E2E)

After #824 made tenant jobs attribute correctly, the first real Vocal
Star job **failed at transcription**: `Lyrics transcription failed: 400
... audioshake.ai/tasks`. Firestore showed `input_media_gcs_path`
pointing at `existing_instrumental.mp3` — transcription was running on
the **instrumental**, not the vocals.

**Root cause:** in the `existing_instrumental` flow (every tenant
submission), the mixed audio and the instrumental are uploaded into the
**same** `uploads/{job_id}/audio/` directory:
- mixed → `audio/<filename>`
- instrumental → `audio/existing_instrumental.*`

On `uploads-complete`, resolving the `'audio'` slot listed the whole
`audio/` dir and took `files[0]` — which sorts to
`existing_instrumental.mp3` (`e` < most letters). So the instrumental
became the transcription input.

This was a **latent bug never hit in prod** because no
existing-instrumental job had ever run end-to-end (0 tenant jobs ever,
per #824).

## Fix
Extract `_select_mixed_audio_files()` to exclude the
existing-instrumental file when selecting the `'audio'` (mixed,
with-vocals) input. Regression tests added (incl. real filenames).

## Testing
- New regression tests + `test_file_upload.py`/`test_upload_api.py`
green (156).
- Re-running the real Vocal Star E2E to completion after this deploys.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-15 03:22:53 -04:00
Andrew Beveridge ☄️andClaude Opus 4.8 fea6ebec1a fix(tenant): make white-label B2B portals attribute jobs to the tenant (Vocal Star + Singa) (#824)
@coderabbitai ignore

## Problem

The white-label tenant portals (`vocalstar.nomadkaraoke.com`,
`singa.nomadkaraoke.com`) looked "done" but **had never worked
end-to-end**: 0 of the last 484 production jobs carried a `tenant_id`.
No tenant job had ever run.

**Root cause:** the frontend API client never sent the `X-Tenant-ID`
header. Tenant portals call the shared `api.nomadkaraoke.com`, whose
Host isn't the tenant subdomain, and the `?tenant=` query param is
disabled in prod — so the backend could never detect the tenant. Every
tenant sign-in and job submission silently fell back to consumer
behavior (default theme, no tenant Dropbox, etc.). The
`getTenantHeaders()` helper existed and was unit-tested, but was never
wired into requests.

## Changes

**Frontend** (`lib/api.ts`, `lib/tenant.ts`)
- Attach `X-Tenant-ID` on all authenticated requests **and** the
magic-link request, sourced from `window.__TENANT_CONFIG__`
(edge-injected by the Cloudflare function; mirrored from the tenant
store for dev/preview). Consumer build resolves no tenant → no header →
**behavior unchanged**.

**Backend** (`_apply_tenant_overrides` in `file_upload.py`)
- Make tenant config **authoritative** over global distribution
defaults. Prod sets `DEFAULT_DROPBOX_PATH` / `DEFAULT_GDRIVE_FOLDER_ID`
/ `DEFAULT_BRAND_PREFIX` globally; these seed `dist`, and the old "fill
only when unset" overlay let them leak — so every tenant job would have
landed in the **shared consumer Dropbox folder** and uploaded to the
**global Google Drive**. Now Dropbox/GDrive routing is gated by the
tenant feature flags and cleared when disabled.

**Tenant configs** (GCS + setup scripts, Vocal Star + Singa)
- Disable Google Drive (`gdrive_upload=false`, `gdrive_folder_id=null`),
keep YouTube off, enable Dropbox to each tenant's own folder. B2B =
locked theme, no YouTube/GDrive, Dropbox + portal download only.

## Why it's consumer-safe
- Frontend: header only attached when a tenant is resolved (never on
`gen.nomadkaraoke.com`).
- Backend: `_apply_tenant_overrides` early-returns when `tenant_config
is None` (all consumer jobs).

## Testing
- New: frontend header-attachment tests (tenant build vs consumer);
backend authoritative-override + feature-flag-gating regression guards
(incl. the global-default-leak case).
- Full suites green: **3466 backend**, **1013 frontend**.
- Verified live tenant configs via API after update.

Manual prod E2E (real track through each portal) + a daily per-tenant
E2E workflow follow in a second PR, once this deploys and is verified in
prod.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-15 02:40:08 -04:00
Andrew Beveridge ☄️andClaude Opus 4.8 fd331a643f infra: GCP cost reductions (artifact cleanup, NAT egress, weekly backup) (#823)
Part of the June 2026 cost-reduction effort
(`docs/archive/2026-06-14-gcp-cost-reduction-plan.md`). Targets the
post-credit-expiry (2026-09-19) bill.

## Changes
- **Item 4 — Artifact Registry cleanup** (~$6/mo + caps growth): keep 10
most-recent versions + delete untagged digests >7d, on all 3 repos
(karaoke-repo, karaoke-backend-gpu, audio-separator; 92 GiB, previously
no policy). In-place update.
- **Item 5 — NAT egress** (~$26/mo): ephemeral GHA runners now always
get an external IP, so egress bypasses the Cloud NAT data-processing
charge (runners were the NAT's only user; us-central1 IN_USE_ADDRESSES
quota is 69, usage 1).
- **Item 6 — backup cadence** (~$15/mo): Firestore export stays nightly
to GCS (1-day local restore point) but uploads to S3 only on Sundays
(1-week off-site RPO) — Firestore is the bulk of the cross-cloud egress.
Staging keeps only the latest export so the weekly upload ships exactly
one.
- **Item 1 — encoding disks** (~$35/mo): pinned the 4 worker hyperdisks
to the free baseline (3000 IOPS / 140 MB/s) **live via `gcloud`**, not
IaC — setting it in IaC forces a capacity-risky VM replacement. A code
comment documents this.

## Deploy status
- `pulumi up` (artifact policies + runner function): **applied** locally
(prod, update 751).
- Backup function source: shipped via
`functions/backup_to_aws/deploy.sh` (pulumi doesn't manage the source
zip).
- Encoding disks: tuned live via gcloud.

## Tests
- `backup_to_aws`: 13 pass (added firestore-cleanup + s3-exclude
coverage).
- `runner_manager/ephemeral`: 32 pass (updated external-IP assertion).

Item 7 (fallback disks on-demand) intentionally deferred — reliability
tradeoff not worth ~$20/mo. See plan doc.

@coderabbitai ignore

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-14 17:11:18 -04:00
Andrew Beveridge ☄️andClaude Opus 4.8 39fb93653f fix(auto-correct): switch active model from Fable 5 to Opus 4.8 (#822)
## Summary

Claude **Fable 5** (`claude-fable-5`) is no longer available on the
Anthropic API. Verified live against `api.anthropic.com`:

```
404 not_found_error: "Claude Fable 5 is not available. Please use Opus 4.8.
Learn more: https://www.anthropic.com/news/fable-mythos-access"
```

`claude-opus-4-8` responds normally and is the API's own prescribed
replacement. Opus 4.8 was also ≈ Gemini 3.1 Pro in our 30-job offline
eval, so switching to it preserves the two-model compare quality.

## Changes

- **`.github/workflows/ci.yml`** (load-bearing):
`AUTO_CORRECT_MODEL=claude-opus-4-8` and
`AUTO_CORRECT_COMPARE_MODELS=claude-opus-4-8;gemini-3.1-pro-preview`.
Compare mode now runs **Opus 4.8 + Gemini 3.1 Pro** instead of Fable +
Gemini.
- **`scripts/measure_autocorrect_cost.py`**: default models + docstring
example → Opus, so the cost tool measures what prod runs.
- **`docs/API.md`**: example auto-correct response reflects Opus.
- **`pyproject.toml`**: `0.182.1` → `0.182.2`.

## Re-enable path

Fable is **disabled, not deleted** — its pricing entry in `pricing.py`
and all Fable unit tests are intentionally left intact. If access
returns, flip it back by reverting the two env-var values in `ci.yml`.

## Testing

- Auto-correct suite: 73 passed (`backend/tests/services/auto_correct/`
+ `test_proactive_auto_correct.py`).
- Live API probe confirmed Fable 404s and Opus 4.8 works.
- CodeRabbit (uncommitted): 0 findings.

@coderabbitai ignore

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-13 10:27:58 -04:00
Andrew Beveridge ☄️andClaude Opus 4.7 dfdbf60dc5 docs(monitoring): document email-channel verification gap (Pulumi vs Console) (#785)
## Summary

Followup to PR #783. The PR claimed Cloud Monitoring would deliver a
verification email to `andrew@beveridge.uk` automatically after `pulumi
up`. It didn't — the channel sat in `UNVERIFIED` state silently, exactly
as if no channel had been created.

The actual GCP behaviour: the auto-send only fires when a channel is
created through the **Cloud Console**. Channels created through the
**API/Pulumi** require an explicit call to the `:sendVerificationCode`
REST endpoint to trigger the email.

I discovered this when running `getVerificationCode` against the channel
and getting `"Cannot generate a verification code from an unverified
channel."` despite `enabled: true`. The right endpoint is
`sendVerificationCode` (no admin-flow restrictions), which returned `{}`
(success) and the email arrived shortly after.

## Change

Rewrite the "Gotcha" callout in `infrastructure/monitoring/README.md` to
explain this, with a copy-paste-ready curl invocation for triggering the
email after any future `pulumi up` that adds a new email channel.

No code change.

@coderabbitai ignore

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-06-12 16:03:05 -04:00
Andrew Beveridge ☄️andClaude Opus 4.8 9f25ae4c4c feat(divebar): on-demand pipeline refresh trigger (refresh action) (#821)
## Why

A track made via gen.nomadkaraoke.com is uploaded to the Nomad Google
Drive immediately, but the Divebar/GCS community mirror only ingests it
on the nightly schedule (mirror index 2 AM, GCS file sync 3 AM, xref
rebuild 6 AM ET). Until then, kjbox's link flow can't find a mirror copy
and falls back to a YouTube download.

This adds an **on-demand "refresh now"** path so a freshly-published
track can be pulled into the catalog within minutes.

## What

New `refresh` action on the **public `divebar-lookup`** Cloud Function:

- Force-runs the three existing scheduler jobs in pipeline order —
`divebar-mirror-daily` (Drive→BigQuery index, makes the track appear) →
`divebar-sync-vm-daily` (Drive→GCS, fast URL) →
`divebar-xref-rebuild-daily` — via `CloudSchedulerClient.run_job`.
Reuses each job's own OIDC identity/target.
- **Least privilege:** the function SA gets a custom
`divebarSchedulerRunner` role (`cloudscheduler.jobs.run` + `.get`) only
— no new function-invoke or compute perms.
- **Token-gated:** the endpoint is public, so the action requires a
shared bearer token (constant-time compare). The token is read from the
`divebar-refresh-token` Secret Manager secret **at runtime** (not
injected as a secret env var) so the function deploys cleanly before the
secret has a version — it just returns a uniform `403` until one is
added, and picks up rotations without a redeploy. Fails closed.

Consumed by kjbox's new "Refresh catalog" button (kjbox#107).

## Tests

`infrastructure/functions/divebar_lookup/test_main.py` — 8 tests: token
gate (wrong/empty/unconfigured), all-jobs-triggered-in-order,
partial-failure tolerance, dispatch 200/403. All green.

## Deploy status — ✅ applied to prod

Applied locally (provider pinned to prod's 9.22.0 so the apply contained
only these 5 resources — no unrelated provider-upgrade churn): `4
created, 1 updated, 262 unchanged`. Function source rebuilt from the new
zip. Secret version set. Verified live: no/wrong token → 403; valid
token → 200 triggering all three jobs.

**Remaining (kjbox#107):** put the same token in the kjbox device
`config.json` as `divebar_refresh_token`, then deploy kjbox.

@coderabbitai ignore

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-12 00:53:41 -04:00
Andrew Beveridge ☄️andClaude Opus 4.8 cf79da79ab fix: honor "use official formatting" correction on search-created jobs (#820)
## Problem

When a user searches for a song, selects **"Use the official
formatting"** (e.g. picks `Hard-Fi — Hard to Beat` over their typed
`hard-fi - hard to beat`), and creates the job, the job was still named
with their raw lowercase query. The official-formatting selection was
silently discarded.

## Root cause

`create_job_from_search` (`backend/api/routes/jobs.py`) derived the
display name from the **original search query stored in the session**,
not from the corrected `artist`/`title` the frontend sends in the
request body:

```python
session_artist = session.get('artist', body.artist)   # always the raw query
effective_display_artist = body.display_artist or session_artist  # body.artist never used
```

Since the session always has an `artist` key, `body.artist` was only
ever an unreachable fallback. The frontend's "Use official formatting"
click correctly updates its state and sends the corrected values — they
were just ignored server-side.

## Fix

Prefer `body.artist`/`body.title` (the wizard's current,
possibly-corrected values) over the stored query, with an explicit
display override still winning above all. Whitespace-only body values
are stripped and fall back to the stored query so a stray `" "` can't
become the job name. The original query is preserved for
`audio_search_artist`/`audio_search_title` matching metadata.

## Tests

- New regression test: corrected artist/title wins over the session
query (fails on old code: `'hard-fi' == 'Hard-Fi'`).
- New test: whitespace-only body artist/title falls back to the stored
query.
- `test_standalone_search.py`: **33 passed**; broader job
route/api/regression suites: **123 passed**.
- Existing `test_display_overrides_applied_when_provided` still passes
(override precedence intact).

Version bumped `0.181.0 → 0.181.1`.

@coderabbitai ignore

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-11 22:44:09 -04:00
Andrew Beveridge ☄️andClaude Opus 4.8 eccf77a626 fix(audio-editor): always show Trim/Fade buttons, disable off-edge (#819)
## Summary
- The Trim Start/End and Fade In/Out buttons in the input audio editor
were **conditionally rendered** — only visible when the selection
touched the very start or end of the track. A mid-track selection showed
only Cut/Mute/Clear, so users couldn't discover the Fade actions at all.
- Reported on a 9:11 track with a 3:02–3:55 selection: the Fade buttons
(shipped in #813) appeared to be "missing in prod" when they were
actually just hidden by the edge-gating.
- Now all four edge-actions **always render** when a selection exists
but are `disabled` off-edge, with a tooltip hint explaining how to
enable them.

## Changes
- `AudioEditor.tsx`: derive `atStartEdge`/`atEndEdge` (1s tolerance,
matching the server-side `afade` anchoring in
`audio_edit_service.fade_region`); render Trim Start, Fade In, Trim End,
Fade Out always, `disabled` off-edge with context-aware `title`
tooltips.
- 6 new i18n keys (`trimStart/EndSelection`, `trim*/fade*DisabledHint`)
added to `en.json` and translated to all 33 locales.
- New jest test asserting a mid-track selection renders the four buttons
disabled.
- Version bump `0.181.0 → 0.182.0`.

## Testing
- [x] `AudioEditor.test.tsx` — 26/26 pass (incl. new disabled-state
test)
- [x] i18n completeness — 33/33 locales at 100%
- [x] No new `tsc` errors in changed files

## Review
- [x] CodeRabbit CLI review completed locally
- [x] In-scope findings addressed (only i18n loanword nits, consistent
with existing convention)

@coderabbitai ignore

---
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-11 22:04:44 -04:00
Andrew Beveridge ☄️andClaude Opus 4.8 a7bb338703 feat(auto-correct): enable proactive pre-generation (runs on API service) (#818)
## Summary

Enables the proactive pre-generation that PR #816 intended but couldn't
deploy (the lyrics-job `--update-secrets` crashed on Cloud Run secret
aliases). Per the chosen approach, the work now runs **on the API
service** — which already has a working `ANTHROPIC_API_KEY` +
`AUTO_CORRECT_COMPARE_MODELS` — instead of the lyrics job, sidestepping
the secret-alias problem entirely.

## How it works

1. Lyrics worker finishes transcription → after `mark_lyrics_complete`,
fires `WorkerService.trigger_auto_correct(job_id)` — a direct, awaited
HTTP call (no Cloud Tasks / new queue). Best-effort: never blocks or
fails the job.
2. New internal endpoint `POST /api/internal/workers/auto-correct`
(admin auth) runs `process_proactive_auto_correct(job_id)` synchronously
on the service: loads `corrections.json`, runs the multi-model
`suggest()` with default settings (cache-aligned with the UI), caches
it. Gated by `AUTO_CORRECT_PROACTIVE_ENABLED`, 180s timeout, swallows
all errors.
3. `ci.yml`: `AUTO_CORRECT_PROACTIVE_ENABLED=true` added to the
**service** env (deploys cleanly — the broken lyrics-job secret path is
gone).

Result: when a reviewer opens the lyrics UI, the auto-run-on-load
request is an instant cache hit.

## Testing
- Backend: **3462 passing** (emulator excluded), incl. rewritten
`test_proactive_auto_correct.py` covering the service worker (flag
gating, no-references skip, happy path multi-model, error-swallow) and
the lyrics-worker trigger (fires / swallows errors).
- CodeRabbit: trace-context propagation + defensive endpoint guard
applied.

## Notes
- Failure modes unchanged & graceful: flaky AI / out of credits /
timeout → endpoint returns a status, job proceeds; UI falls back to
on-demand generation.
- Version bumped 0.180.0 → 0.181.0.

@coderabbitai ignore

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-11 19:42:08 -04:00
Andrew Beveridge ☄️andClaude Opus 4.8 32dfd9fbdc fix(ci): revert lyrics-transcription-job to image-only deploy (#817)
## Why

PR #816's deploy **failed** at the "Update Cloud Run Jobs" step:

```
ERROR: gcloud crashed (ValueError): Invalid secret path 'projects/nomadkaraoke/secrets/audioshake-api-key' in annotation
```

The `--update-secrets ANTHROPIC_API_KEY=…` I added to
`lyrics-transcription-job` made gcloud re-validate the job's *existing*
secrets, which are stored via Cloud Run **secret aliases**
(`secret-alias-N`) in a format `--update-secrets` rejects. That crash
stranded **lyrics + audio jobs on the previous image** (the API service
deployed fine and is healthy; the video-encoding-job updated fine).

## Fix

Revert the lyrics-job step to **image-only** (proven to work — same form
the video/audio job steps use). This makes deploys succeed and brings
lyrics + audio jobs onto the current image, so prod is consistent again.

Proactive auto-correct ships dormant: the worker's
`_run_proactive_auto_correct()` is gated by
`AUTO_CORRECT_PROACTIVE_ENABLED`, which is unset, so it returns early
(no-op, zero risk). Wiring that env + the Anthropic secret onto the job
via an alias-safe method is a tracked follow-up.

## Testing
- No code change; CI-only. The reverted step matches the working
video-encoding-job step exactly.

@coderabbitai ignore

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-11 18:48:38 -04:00
Andrew Beveridge ☄️andClaude Opus 4.8 364e4ebd5f feat(auto-correct): proactive multi-model suggestions + cost logging + de-AI-ified review UI (#816)
## Summary

Makes AI lyrics auto-correction run **automatically on every job**
(multi-model), so suggestions are cached and ready the moment the
reviewer opens the lyrics UI — plus token/cost instrumentation and a UI
cleanup that removes all "AI"/"model" wording.

Measured cost first (`scripts/measure_autocorrect_cost.py`):
**~$0.13/track** multi-model on normal songs — cheap enough to run
proactively.

## Changes

**Cost instrumentation**
- Capture per-model `usage` from Anthropic + Gemini; log greppable
`auto-correct usage` / `auto-correct cost … total_est_cost_usd=…` lines
from `suggest()`.
- `backend/services/auto_correct/pricing.py` (Anthropic rates
authoritative; Gemini estimated) + `scripts/measure_autocorrect_cost.py`
offline harness.

**Proactive generation (every job)**
- `lyrics_worker._run_proactive_auto_correct()` runs the multi-model
path after `mark_lyrics_complete` (downstream already triggered →
non-blocking), gated by `AUTO_CORRECT_PROACTIVE_ENABLED`, bounded by a
180s timeout, and **swallows every error** — it never blocks or fails
the karaoke job (flaky AI / out of credits / timeout all degrade
gracefully).
- Cache-key aligned with the UI request, so the review page's on-load
call is an instant cache hit (no double spend).
- `ci.yml`: wires `AUTO_CORRECT_*` env + the `anthropic-api-key` secret
onto `lyrics-transcription-job` (same SA as the API service — no IAM
change).

**Review UI**
- Always multi-model (removed the model-selection toggle); button
renamed **"Auto-correct"**; stripped model/consensus/cached attribution
badges; reworded strings to drop "AI"/"model" (translated to all 32
locales).
- Auto-runs once on review load so suggestions are ready without a
click; the button stays for the paste-references-later flow.

## Testing
- Backend: **3460 passed** (`backend/tests/`, emulator excluded) — incl.
new `test_pricing.py` + `test_proactive_auto_correct.py` (gating,
graceful failure, cache alignment).
- Frontend: **1006 jest tests pass**; type-clean; 33-locale key parity
verified.

## Notes / follow-ups
- Proactive activates on the **next deploy** (the lyrics-job env/secret
apply via this PR's ci.yml on merge).
- Left "AI" wording in two *separate* features untouched (different
subsystems): `lyricsReview.agenticMetrics` and
`lyricsReview.modals.correctionAnnotation` — flagged for a separate
decision.
- The production E2E spec's click-to-open flow may want a tweak now that
suggestions auto-run on load.

@coderabbitai ignore

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-11 18:22:51 -04:00
Andrew Beveridge ☄️andClaude Fable 5 0dd5d404e5 feat: cache AI auto-correct suggestions per job (free re-runs on unmodified lyrics) (#815)
@coderabbitai ignore

Per Andrew: clicking AI Suggest twice on the same unmodified lyrics
shouldn't spend AI tokens twice.

Suggestions are now cached per job in GCS
(`jobs/{job_id}/lyrics/auto_correct_cache/{hash}.json`), keyed on the
exact input — word ids + texts, reference lyrics texts, settings knobs,
and the resolved model list. A repeat run on byte-identical input
returns the previous suggestions instantly with `cached: true` (teal
"cached" badge in the panel) and incurs no LLM cost. Any edit to the
lyrics, references, or settings produces a new key and a fresh run; word
ids in the key guarantee cached suggestions always reference words that
still exist.

Cache reads/writes are strictly best-effort — any storage failure
degrades to a normal uncached run (tested). 7 new backend tests (hit
skips model call, miss writes cache, key stability/sensitivity, payload
round-trip, corrupt entry = miss, storage failure never breaks the
request).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-06-11 18:03:44 +00:00
Andrew Beveridge ☄️andClaude Fable 5 5bf8de3730 fix: AI suggestions list overflows panel instead of scrolling (#814)
@coderabbitai ignore

The suggestions list in the auto-correct panel rendered past the panel
border over the content below (screenshot from Andrew on job b9adb5b4
with 39 suggestions). Root cause: the repo's `ScrollArea` Radix root has
no `overflow-hidden`, so `max-h-64` on it never clips the viewport.
Replaced with a plain `max-h-64 overflow-y-auto` div — native scroll,
guaranteed containment.

Test-impact: none (tsc clean, auto-correct suites pass; pure
CSS/structure change).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-06-11 17:32:22 +00:00
95 changed files with 3747 additions and 556 deletions

No files matched your search

+9 -1
View File
@@ -1658,7 +1658,7 @@ jobs:
--min-instances 1 \
--vpc-connector projects/nomadkaraoke/locations/us-central1/connectors/cloud-run-connector \
--vpc-egress private-ranges-only \
--set-env-vars "GOOGLE_CLOUD_PROJECT=${{ env.PROJECT_ID }},GCS_BUCKET_NAME=karaoke-gen-storage-${{ env.PROJECT_ID }},FIRESTORE_COLLECTION=jobs,ENVIRONMENT=production,KARAOKE_GEN_VERSION=$VERSION,DEFAULT_DROPBOX_PATH=/MediaUnsynced/Karaoke/Tracks-Organized,DEFAULT_GDRIVE_FOLDER_ID=1laRKAyxo0v817SstfM5XkpbWiNKNAMSX,ENABLE_CLOUD_TASKS=true,CLOUD_RUN_SERVICE_URL=https://api.nomadkaraoke.com,GCP_REGION=us-central1,DEFAULT_ENABLE_YOUTUBE_UPLOAD=true,DEFAULT_BRAND_PREFIX=NOMAD,DEFAULT_PRIVATE_DROPBOX_PATH=/MediaUnsynced/Karaoke/Tracks-NonPublished,DEFAULT_PRIVATE_BRAND_PREFIX=NOMADNP,USE_GCE_ENCODING=true,USE_GCE_PREVIEW_ENCODING=true,ENABLE_PUSH_NOTIFICATIONS=true,USE_CLOUD_RUN_JOBS_FOR_VIDEO=true,EMAIL_PROVIDER=postmark,AUTO_CORRECT_MODEL=claude-fable-5,AUTO_CORRECT_COMPARE_MODELS=claude-fable-5;gemini-3.1-pro-preview,COMMIT_SHA=${{ steps.build-meta.outputs.sha }},PR_NUMBER=${{ steps.build-meta.outputs.pr_number }},PR_TITLE=${{ steps.build-meta.outputs.pr_title }}" \
--set-env-vars "GOOGLE_CLOUD_PROJECT=${{ env.PROJECT_ID }},GCS_BUCKET_NAME=karaoke-gen-storage-${{ env.PROJECT_ID }},FIRESTORE_COLLECTION=jobs,ENVIRONMENT=production,KARAOKE_GEN_VERSION=$VERSION,DEFAULT_DROPBOX_PATH=/MediaUnsynced/Karaoke/Tracks-Organized,DEFAULT_GDRIVE_FOLDER_ID=1laRKAyxo0v817SstfM5XkpbWiNKNAMSX,ENABLE_CLOUD_TASKS=true,CLOUD_RUN_SERVICE_URL=https://api.nomadkaraoke.com,GCP_REGION=us-central1,DEFAULT_ENABLE_YOUTUBE_UPLOAD=true,DEFAULT_BRAND_PREFIX=NOMAD,DEFAULT_PRIVATE_DROPBOX_PATH=/MediaUnsynced/Karaoke/Tracks-NonPublished,DEFAULT_PRIVATE_BRAND_PREFIX=NOMADNP,USE_GCE_ENCODING=true,USE_GCE_PREVIEW_ENCODING=true,ENABLE_PUSH_NOTIFICATIONS=true,USE_CLOUD_RUN_JOBS_FOR_VIDEO=true,EMAIL_PROVIDER=postmark,AUTO_CORRECT_MODEL=claude-opus-4-8,AUTO_CORRECT_COMPARE_MODELS=claude-opus-4-8;gemini-3.1-pro-preview,AUTO_CORRECT_PROACTIVE_ENABLED=true,COMMIT_SHA=${{ steps.build-meta.outputs.sha }},PR_NUMBER=${{ steps.build-meta.outputs.pr_number }},PR_TITLE=${{ steps.build-meta.outputs.pr_title }}" \
--set-secrets "ANTHROPIC_API_KEY=anthropic-api-key:latest,AUDIOSHAKE_API_TOKEN=audioshake-api-key:latest,GENIUS_API_TOKEN=genius-api-key:latest,SPOTIFY_COOKIE_SP_DC=spotify-cookie:latest,RAPIDAPI_KEY=rapidapi-key:latest,DEFAULT_DISCORD_WEBHOOK_URL=discord-releases-webhook:latest,ADMIN_TOKENS=admin-tokens:latest,RED_API_KEY=red-api-key:latest,RED_API_URL=red-api-url:latest,OPS_API_KEY=ops-api-key:latest,OPS_API_URL=ops-api-url:latest,FLACFETCH_API_URL=flacfetch-api-url:latest,FLACFETCH_API_KEY=flacfetch-api-key:latest,POSTMARK_SERVER_TOKEN=postmark-server-token:latest,STRIPE_SECRET_KEY=stripe-secret-key:latest,STRIPE_WEBHOOK_SECRET=stripe-webhook-secret:latest,LANGFUSE_PUBLIC_KEY=langfuse-public-key:latest,LANGFUSE_SECRET_KEY=langfuse-secret-key:latest,LANGFUSE_HOST=langfuse-host:latest,ENCODING_WORKER_URL=encoding-worker-url:latest,ENCODING_WORKER_API_KEY=encoding-worker-api-key:latest,ENCODING_WORKER_FALLBACK_VMS=encoding-worker-fallback-vms:latest,VAPID_PUBLIC_KEY=vapid-public-key:latest,VAPID_PRIVATE_KEY=vapid-private-key:latest,E2E_BYPASS_KEY=e2e-bypass-key:latest,GDRIVE_VALIDATOR_URL=gdrive-validator-url:latest"
- name: Update Cloud Run Jobs with new image
@@ -1676,6 +1676,14 @@ jobs:
--quiet
# Lyrics transcription job (CPU, us-central1)
# NOTE: image-only update. Adding --update-secrets here crashed gcloud
# ("Invalid secret path ... in annotation") because this job's existing
# secrets are stored via Cloud Run secret *aliases* that --update-secrets
# re-validates and rejects. Proactive auto-correct env/secret
# (AUTO_CORRECT_PROACTIVE_ENABLED + ANTHROPIC_API_KEY) must be wired by a
# method that handles the alias format (see proactive-autocorrect plan
# doc); until then the proactive flag stays unset and the worker's
# _run_proactive_auto_correct() returns early (no-op).
gcloud run jobs update lyrics-transcription-job \
--image "$IMAGE" \
--region us-central1 \
+111
View File
@@ -0,0 +1,111 @@
name: E2E Daily Test (Tenant Portals)
# Full production E2E per white-label tenant: submit a job with the tenant's own
# mixed + instrumental audio, approve the lyrics review, wait for the render, and assert
# the tenant distribution (locked theme, no YouTube, no Google Drive, Dropbox folder +
# downloadable outputs). Mirrors the consumer e2e-daily.yml. Each run cleans up its job.
on:
schedule:
# Daily at 07:37 UTC (off-peak, off the :00 mark).
- cron: '37 7 * * *'
workflow_dispatch:
inputs:
tenant:
description: 'Tenant to test (blank = all)'
required: false
default: ''
type: choice
options:
- ''
- vocalstar
- singa
permissions:
contents: read
id-token: write # for Workload Identity Federation
jobs:
e2e-tenant:
name: "Tenant E2E: ${{ matrix.tenant }}"
runs-on: ubuntu-latest
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
tenant: [vocalstar, singa]
# On manual dispatch with a specific tenant, only run that one.
if: ${{ github.event.inputs.tenant == '' || github.event.inputs.tenant == matrix.tenant }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Authenticate to GCP
uses: google-github-actions/auth@v2
with:
workload_identity_provider: ${{ secrets.GCP_WORKLOAD_IDENTITY_PROVIDER }}
service_account: ${{ secrets.GCP_SERVICE_ACCOUNT }}
- name: Install dependencies
run: pip install google-cloud-storage google-cloud-secret-manager
- name: Run tenant E2E
id: run_test
env:
KARAOKE_ADMIN_TOKEN: ${{ secrets.E2E_ADMIN_TOKEN }}
run: |
echo "=== Tenant E2E: ${{ matrix.tenant }} ==="
python scripts/e2e/tenant_e2e.py ${{ matrix.tenant }} 2>&1 | tee e2e-output.log
echo "exit_code=${PIPESTATUS[0]}" >> "$GITHUB_OUTPUT"
continue-on-error: true
- name: Upload logs
if: always()
uses: actions/upload-artifact@v4
with:
name: e2e-tenant-${{ matrix.tenant }}-${{ github.run_number }}
path: e2e-output.log
retention-days: 14
- name: Discord notification (failure)
if: ${{ steps.run_test.outputs.exit_code != '0' }}
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_ALERT_WEBHOOK_URL }}
run: |
if [ -n "$DISCORD_WEBHOOK" ]; then
curl -s -H "Content-Type: application/json" \
-d "{\"embeds\": [{\"title\": \"❌ Tenant E2E FAILED — ${{ matrix.tenant }}\", \"description\": \"Run: #${{ github.run_number }}\", \"color\": 15158332}]}" \
"$DISCORD_WEBHOOK" || true
fi
- name: Fail the job if the test failed
if: ${{ steps.run_test.outputs.exit_code != '0' }}
run: exit 1
notify-email:
name: "Email summary"
runs-on: ubuntu-latest
needs: e2e-tenant
if: ${{ always() && github.event_name == 'schedule' }}
steps:
- name: Send email notification
uses: dawidd6/action-send-mail@v3
with:
server_address: smtp.postmarkapp.com
server_port: 587
username: ${{ secrets.POSTMARK_SERVER_TOKEN }}
password: ${{ secrets.POSTMARK_SERVER_TOKEN }}
subject: "Tenant E2E Daily ${{ needs.e2e-tenant.result == 'success' && 'PASSED' || 'FAILED' }} - Run #${{ github.run_number }}"
to: andrew@nomadkaraoke.com
from: "Karaoke Gen CI <noreply@nomadkaraoke.com>"
body: |
Tenant E2E Daily Test (Vocal Star + Singa)
Result: ${{ needs.e2e-tenant.result }}
Run: #${{ github.run_number }}
Details: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
+32 -11
View File
@@ -57,6 +57,19 @@ def _is_youtube_url(url: str) -> bool:
router = APIRouter(tags=["jobs"])
def _select_mixed_audio_files(files):
"""Filter a listing of ``uploads/{job_id}/audio/`` down to the mixed (with-vocals) audio.
When a job supplies its own instrumental (existing_instrumental flow, e.g. tenant
submissions), that file is uploaded into the SAME ``audio/`` directory as the mixed
audio (``existing_instrumental.*``). The ``audio/`` prefix therefore matches both, and
because ``existing_instrumental`` sorts before most filenames, ``files[0]`` would pick
the instrumental — so transcription would run on the backing track instead of the
vocals. Excluding it here ensures the mixed audio is selected as the transcription input.
"""
return [f for f in files if not Path(f).name.startswith('existing_instrumental')]
def _apply_tenant_overrides(
dist: EffectiveDistributionSettings,
tenant_config,
@@ -67,12 +80,20 @@ def _apply_tenant_overrides(
"""
Apply tenant-specific overrides to distribution settings and job options.
White-label tenant config is AUTHORITATIVE: it replaces (not just fills in) the
distribution settings, so tenant outputs never inherit the global consumer defaults
(DEFAULT_BRAND_PREFIX / DEFAULT_DROPBOX_PATH / DEFAULT_GDRIVE_FOLDER_ID) that
``get_effective_distribution_settings`` seeds into ``dist``. Without this, every
tenant job would land in the shared consumer Dropbox folder and upload to the global
Google Drive, regardless of the tenant's own config.
For tenant jobs:
- Overlays brand_prefix, dropbox_path, gdrive_folder_id from tenant defaults
(only when not already set in the request body / dist)
- Sets brand_prefix, dropbox_path, gdrive_folder_id authoritatively from tenant config
- Routes Dropbox / Google Drive only when the matching feature flag is enabled;
otherwise disables that channel entirely (no global-default leak)
- Forces is_private = True
- Applies locked_theme as effective theme
- Disables YouTube upload
- Disables YouTube upload (tenants never publish to YouTube)
Returns:
Tuple of (dist, effective_theme_id, is_private, enable_youtube_upload)
@@ -81,14 +102,12 @@ def _apply_tenant_overrides(
return dist, effective_theme_id, is_private, enable_youtube_upload
defaults = tenant_config.defaults
features = tenant_config.features
# Overlay tenant distribution defaults (request-level values take precedence)
if defaults.brand_prefix and not dist.brand_prefix:
dist.brand_prefix = defaults.brand_prefix
if defaults.dropbox_path and not dist.dropbox_path:
dist.dropbox_path = defaults.dropbox_path
if defaults.gdrive_folder_id and not dist.gdrive_folder_id:
dist.gdrive_folder_id = defaults.gdrive_folder_id
# Authoritative distribution routing (overrides any global defaults in `dist`).
dist.brand_prefix = defaults.brand_prefix
dist.dropbox_path = defaults.dropbox_path if features.dropbox_upload else None
dist.gdrive_folder_id = defaults.gdrive_folder_id if features.gdrive_upload else None
# Force private for all tenant jobs
is_private = True
@@ -1382,12 +1401,14 @@ async def mark_uploads_complete(
# List files with this prefix to find the actual uploaded file
files = storage_service.list_files(prefix)
if file_type == 'audio':
files = _select_mixed_audio_files(files)
if not files:
raise HTTPException(
status_code=400,
detail=f"File for '{file_type}' was not uploaded to GCS. Expected prefix: {prefix}"
)
# Use the first (and should be only) file found
gcs_path = files[0]
+43
View File
@@ -20,6 +20,7 @@ from fastapi import APIRouter, HTTPException, BackgroundTasks, Depends, Request
from pydantic import BaseModel
from backend.workers.audio_worker import process_audio_separation
from backend.workers.auto_correct_worker import process_proactive_auto_correct
from backend.workers.lyrics_worker import process_lyrics_transcription
from backend.workers.screens_worker import generate_screens
from backend.workers.video_worker import generate_video
@@ -227,6 +228,48 @@ async def trigger_lyrics_worker(
)
@router.post("/workers/auto-correct", response_model=WorkerResponse)
async def trigger_auto_correct_worker(
request: WorkerRequest,
http_request: Request,
auth_data: Tuple[str, UserType, int] = Depends(require_admin)
):
"""Proactively pre-generate + cache AI auto-correct suggestions for a job.
Called by the lyrics worker once transcription + references are ready, so
the suggestions are cached before the reviewer opens the lyrics UI. Runs
HERE (the API service) because the service has the working Anthropic key /
compare-models config; the lyrics job does not.
Best-effort and runs synchronously within the request (the caller awaits
with its own timeout): the work never fails the karaoke job, and the
response just reports what happened. Gated by AUTO_CORRECT_PROACTIVE_ENABLED.
"""
job_id = request.job_id
# Extract trace context from incoming request (propagated via the trigger).
trace_context = extract_trace_context(dict(http_request.headers))
logger.info(f"[job:{job_id}] WORKER_TRIGGER worker=auto-correct")
add_span_attribute("job_id", job_id)
add_span_attribute("worker", "auto-correct")
# process_proactive_auto_correct already swallows its own errors; the extra
# guard keeps the endpoint itself best-effort no matter what.
try:
result = await process_proactive_auto_correct(job_id)
add_span_event("auto_correct_proactive", {"result": result.get("status", "unknown")})
return WorkerResponse(
status=result.get("status", "unknown"),
job_id=job_id,
message=f"Proactive auto-correct: {result.get('status', 'unknown')}",
)
except Exception as e: # noqa: BLE001 — best-effort, never fail the caller
logger.warning(f"[job:{job_id}] auto-correct endpoint error (non-fatal): {e}")
add_span_event("auto_correct_proactive", {"result": "error"})
return WorkerResponse(status="error", job_id=job_id, message=f"error: {e}")
@router.post("/workers/screens", response_model=WorkerResponse)
async def trigger_screens_worker(
request: WorkerRequest,
+20 -3
View File
@@ -1475,6 +1475,13 @@ async def complete_review(
try:
# Store instrumental selection if provided (combined review flow)
instrumental_selection = body.instrumental_selection if body else None
# Jobs that supplied their own instrumental (existing_instrumental flow, e.g. tenant
# submissions) have no instrumental-selection UI step. Default to 'custom' so the
# render uses the provided instrumental instead of a separated stem that was never
# produced (the orchestrator otherwise defaults to 'clean' and fails prerequisites).
if not instrumental_selection and getattr(job, 'existing_instrumental_gcs_path', None):
instrumental_selection = 'custom'
logger.info(f"Job {job_id}: Defaulting instrumental selection to 'custom' (existing instrumental provided)")
if instrumental_selection:
job_manager.update_state_data(job_id, 'instrumental_selection', instrumental_selection)
logger.info(f"Job {job_id}: Stored instrumental selection: {instrumental_selection}")
@@ -2434,11 +2441,21 @@ async def create_job_from_search(
from backend.services.job_defaults_service import resolve_cdg_txt_defaults
resolved_cdg, resolved_txt = resolve_cdg_txt_defaults(effective_theme_id, None, None)
# Determine display values
# Determine display values.
# The session stores the ORIGINAL search query (e.g. "hard-fi"). body.artist/
# body.title carry whatever is currently in the wizard's artist/title fields,
# which reflect a "Use official formatting" correction the user may have applied
# after searching. The displayed job name must honour that correction, so prefer
# the request body over the stored query. An explicit display override wins above all.
session_artist = session.get('artist', body.artist)
session_title = session.get('title', body.title)
effective_display_artist = body.display_artist or session_artist
effective_display_title = body.display_title or session_title
# body.artist/body.title are required but unvalidated for whitespace, so strip
# them and fall back to the stored query if blank (display_* is pre-stripped to
# None by its validator). This keeps a stray " " from becoming the job name.
body_artist = (body.artist or "").strip()
body_title = (body.title or "").strip()
effective_display_artist = body.display_artist or body_artist or session_artist
effective_display_title = body.display_title or body_title or session_title
tenant_id = session.get('tenant_id') or ""
+2
View File
@@ -105,6 +105,7 @@ class AutoCorrectResponse(_PydBaseModel):
elapsed_seconds: float
settings_applied: dict
warnings: list[str]
cached: bool = False
def _get_custom_lyrics_service_dep() -> CustomLyricsService:
@@ -747,6 +748,7 @@ async def auto_correct_suggestions(
elapsed_seconds=result.elapsed_seconds,
settings_applied=result.settings_applied.to_dict(),
warnings=result.warnings,
cached=result.cached,
)
+8
View File
@@ -95,6 +95,14 @@ class Settings(BaseSettings):
# Models used by the multi-model "compare" mode (semicolon-separated —
# Cloud Run --set-env-vars is comma-delimited). Empty = single-model only.
auto_correct_compare_models: str = os.getenv("AUTO_CORRECT_COMPARE_MODELS", "")
# Proactively generate (and cache) auto-correct suggestions in the lyrics
# worker once transcription + references are ready, so the review UI has
# them instantly. Best-effort: failures never block or fail the job. Only
# meaningful where ANTHROPIC_API_KEY + AUTO_CORRECT_COMPARE_MODELS are set
# (the lyrics-transcription-job, via ci.yml). Default off.
auto_correct_proactive_enabled: bool = os.getenv(
"AUTO_CORRECT_PROACTIVE_ENABLED", "false"
).lower() in ("true", "1", "yes")
# Cloud Tasks (for scalable worker coordination)
# When enabled, workers are triggered via Cloud Tasks for guaranteed delivery
+94
View File
@@ -0,0 +1,94 @@
"""Token pricing for auto-correct model calls.
Used to turn the per-call token usage we capture from each provider into an
estimated USD cost, for both the production usage logs and the offline
measurement script (``scripts/measure_autocorrect_cost.py``).
Prices are USD per 1,000,000 tokens.
- **Anthropic** prices are authoritative (published Claude API pricing).
``output`` is the billed output rate, which already includes adaptive
*thinking* tokens — they are billed as output and are not separable from
the final answer in the Anthropic usage object.
- **Gemini** prices are a best-known ESTIMATE for the Vertex preview tier and
are clearly marked below. Verify against current Vertex pricing before
relying on the dollar figure. Gemini thinking tokens ARE separable
(``thoughts_token_count``) and are billed at the output rate, so we fold
them into the output total.
The raw token counts are always logged alongside the dollar figure, so the
cost here is a derived convenience — if a rate is stale, recompute from the
logged tokens rather than trusting the historical USD value.
"""
from __future__ import annotations
from typing import Optional, TypedDict
class TokenUsage(TypedDict):
"""Normalized, provider-agnostic usage for one model call.
``output_tokens`` is the total billed output (final answer + thinking).
``thinking_tokens`` is informational only (None when the provider does
not report it separately) — it is already counted inside ``output_tokens``.
"""
input_tokens: int
output_tokens: int
cache_read_tokens: int
thinking_tokens: Optional[int]
class _Rate(TypedDict):
input: float
output: float
cache_read: float
# USD per 1,000,000 tokens.
MODEL_PRICING: dict[str, _Rate] = {
# --- Anthropic (authoritative) ---
"claude-fable-5": {"input": 10.0, "output": 50.0, "cache_read": 1.0},
"claude-opus-4-8": {"input": 5.0, "output": 25.0, "cache_read": 0.5},
"claude-sonnet-4-6": {"input": 3.0, "output": 15.0, "cache_read": 0.3},
"claude-haiku-4-5": {"input": 1.0, "output": 5.0, "cache_read": 0.1},
# --- Gemini (ESTIMATE — Vertex 3.x Pro preview, <=200K-token context
# tier; confirm against current Google pricing before trusting USD) ---
"gemini-3.1-pro-preview": {"input": 2.0, "output": 12.0, "cache_read": 0.2},
}
def get_rate(model: str) -> Optional[_Rate]:
"""Return the rate card for ``model``, or None if we have no pricing.
Falls back to a prefix match on the model family (e.g. a dated
``claude-fable-5-2026...`` snapshot still resolves to ``claude-fable-5``)
so a minor model-id change doesn't silently drop cost tracking.
"""
if model in MODEL_PRICING:
return MODEL_PRICING[model]
for known, rate in MODEL_PRICING.items():
if model.startswith(known):
return rate
return None
def estimate_cost_usd(model: str, usage: Optional[TokenUsage]) -> Optional[float]:
"""Estimate the USD cost of one model call from its token usage.
Returns None when usage is unavailable or the model has no known pricing,
so callers can distinguish "free/zero" from "unknown".
"""
if not usage:
return None
rate = get_rate(model)
if rate is None:
return None
input_tokens = usage.get("input_tokens") or 0
output_tokens = usage.get("output_tokens") or 0
cache_read = usage.get("cache_read_tokens") or 0
return (
input_tokens * rate["input"]
+ output_tokens * rate["output"]
+ cache_read * rate["cache_read"]
) / 1_000_000.0
+201 -9
View File
@@ -1,17 +1,19 @@
"""Auto-correct suggestion service: one whole-song LLM call, validated output."""
from __future__ import annotations
import hashlib
import json
import logging
import time
import uuid
from dataclasses import dataclass, field
from dataclasses import asdict, dataclass, field
from typing import Any, Optional
from google import genai
from google.genai import types
from backend.config import get_settings
from backend.services.auto_correct.pricing import TokenUsage, estimate_cost_usd
from backend.services.auto_correct.prompts import (
RESPONSE_SCHEMA,
build_system_prompt,
@@ -66,6 +68,8 @@ class AutoCorrectResult:
elapsed_seconds: float
settings_applied: AutoCorrectSettings
warnings: list[str] = field(default_factory=list)
# True when served from the per-job GCS cache (no LLM call was made).
cached: bool = False
class AutoCorrectService:
@@ -110,13 +114,35 @@ class AutoCorrectService:
)
models = self._models_for(settings)
# Re-running on byte-identical input (lyrics, references, settings,
# models) returns the previous result instead of paying for another
# LLM call. Word ids are part of the key, so cached suggestions
# always reference words that still exist.
cache_path = self._cache_path(
job_id, models, settings, flat, reference_lyrics, artist, title
)
cached = self._cache_get(cache_path)
if cached is not None:
logger.info(
"auto-correct cache hit job=%s suggestions=%d", job_id,
len(cached.suggestions),
)
return cached
t0 = time.time()
per_model: dict[str, list[Suggestion]] = {}
# Token usage per successful model call (None when the provider's
# usage object couldn't be read). Drives the cost log below.
per_model_usage: dict[str, Optional[TokenUsage]] = {}
warnings: list[str] = []
if len(models) == 1:
raw = self._call_model(models[0], system_prompt, user_prompt, job_id=job_id)
raw, usage = self._call_model(
models[0], system_prompt, user_prompt, job_id=job_id
)
suggestions, vw = self._validate(raw, flat, settings)
per_model[models[0]] = suggestions
per_model_usage[models[0]] = usage
warnings.extend(vw)
else:
import concurrent.futures as cf
@@ -130,7 +156,7 @@ class AutoCorrectService:
}
for fut, m in futures.items():
try:
raw = fut.result()
raw, usage = fut.result()
suggestions, vw = self._validate(raw, flat, settings)
except AutoCorrectServiceError as exc:
# One model failing (call OR malformed output) must not
@@ -138,6 +164,7 @@ class AutoCorrectService:
warnings.append(f"model {m} failed: {exc}")
continue
per_model[m] = suggestions
per_model_usage[m] = usage
warnings.extend(f"[{m}] {w}" for w in vw)
if not per_model:
raise AutoCorrectServiceError(
@@ -151,13 +178,131 @@ class AutoCorrectService:
"auto-correct job=%s models=%s words=%d suggestions=%d dropped_warnings=%d elapsed=%.1fs",
job_id, model_label, len(flat), len(merged), len(warnings), elapsed,
)
return AutoCorrectResult(
self._log_usage(job_id, per_model_usage)
result = AutoCorrectResult(
suggestions=merged,
model=model_label,
elapsed_seconds=round(elapsed, 1),
settings_applied=settings,
warnings=warnings,
)
self._cache_put(cache_path, result)
return result
@staticmethod
def _log_usage(
job_id: str, per_model_usage: dict[str, Optional[TokenUsage]]
) -> None:
"""Emit greppable per-model and total cost lines for one suggest() call.
Token counts are ground truth; the USD figures are derived from
``pricing.MODEL_PRICING`` and use ESTIMATED Gemini rates (see that
module). Query in Cloud Logging via ``auto-correct usage`` /
``auto-correct cost``. Observability only — never raises.
"""
total_cost = 0.0
any_cost = False
for model, usage in per_model_usage.items():
cost = estimate_cost_usd(model, usage)
if cost is not None:
total_cost += cost
any_cost = True
if usage is None:
logger.info(
"auto-correct usage job=%s model=%s tokens=unavailable",
job_id, model,
)
continue
thinking = usage.get("thinking_tokens")
logger.info(
"auto-correct usage job=%s model=%s input_tokens=%d "
"output_tokens=%d thinking_tokens=%s cache_read_tokens=%d "
"est_cost_usd=%s",
job_id,
model,
usage.get("input_tokens", 0),
usage.get("output_tokens", 0),
"na" if thinking is None else thinking,
usage.get("cache_read_tokens", 0),
"unknown" if cost is None else f"{cost:.4f}",
)
logger.info(
"auto-correct cost job=%s models=%s total_est_cost_usd=%s",
job_id,
", ".join(per_model_usage.keys()),
f"{total_cost:.4f}" if any_cost else "unknown",
)
# ---- suggestion cache (GCS, best-effort) ----
def _get_storage(self):
if not hasattr(self, "_storage"):
from backend.services.storage_service import StorageService
self._storage = StorageService()
return self._storage
@staticmethod
def _cache_path(
job_id: str,
models: list[str],
settings: AutoCorrectSettings,
flat: list[tuple[str, str, str]],
reference_lyrics: dict[str, dict],
artist: Optional[str],
title: Optional[str],
) -> str:
payload = {
"v": 1,
"models": models,
"settings": settings.to_dict(),
"words": [[word_id, text] for word_id, text, _seg in flat],
"references": {
source: [seg.get("text", "") for seg in (ref.get("segments") or [])]
for source, ref in sorted((reference_lyrics or {}).items())
},
"artist": artist,
"title": title,
}
digest = hashlib.sha256(
json.dumps(payload, sort_keys=True, ensure_ascii=False).encode()
).hexdigest()[:24]
return f"jobs/{job_id}/lyrics/auto_correct_cache/{digest}.json"
def _cache_get(self, path: str) -> Optional[AutoCorrectResult]:
"""Best-effort: any storage/shape problem is a cache miss, never an error."""
try:
storage = self._get_storage()
if not storage.bucket.blob(path).exists():
return None
data = storage.download_json(path)
return AutoCorrectResult(
suggestions=[Suggestion(**s) for s in data["suggestions"]],
model=data["model"],
elapsed_seconds=0.0,
settings_applied=AutoCorrectSettings(**data["settings_applied"]),
warnings=list(data.get("warnings") or []),
cached=True,
)
except Exception:
logger.warning("auto-correct cache read failed for %s", path, exc_info=True)
return None
def _cache_put(self, path: str, result: AutoCorrectResult) -> None:
"""Best-effort: a failed cache write never fails the request."""
try:
self._get_storage().upload_json(
path,
{
"suggestions": [asdict(s) for s in result.suggestions],
"model": result.model,
"settings_applied": result.settings_applied.to_dict(),
"warnings": result.warnings,
"elapsed_seconds": result.elapsed_seconds,
},
)
except Exception:
logger.warning("auto-correct cache write failed for %s", path, exc_info=True)
def _models_for(self, settings: AutoCorrectSettings) -> list[str]:
if settings.compare_models:
@@ -242,14 +387,59 @@ class AutoCorrectService:
def _call_model(
self, model: str, system_prompt: str, user_prompt: str, *, job_id: str
) -> Any:
) -> tuple[Any, Optional[TokenUsage]]:
"""Return (parsed_json, token_usage). Usage is None if unreadable."""
if model.startswith("claude"):
return self._call_anthropic(model, system_prompt, user_prompt, job_id=job_id)
return self._call_gemini(model, system_prompt, user_prompt, job_id=job_id)
@staticmethod
def _anthropic_usage(response: Any) -> Optional[TokenUsage]:
"""Best-effort usage from an Anthropic response.
``output_tokens`` already includes adaptive thinking tokens (billed as
output); they are not separable here, so thinking_tokens is None.
Returns None on any shape problem — usage must never break the call.
"""
try:
u = response.usage
return TokenUsage(
input_tokens=int(getattr(u, "input_tokens", 0) or 0),
output_tokens=int(getattr(u, "output_tokens", 0) or 0),
cache_read_tokens=int(getattr(u, "cache_read_input_tokens", 0) or 0),
thinking_tokens=None,
)
except Exception:
logger.debug("auto-correct: could not read Anthropic usage", exc_info=True)
return None
@staticmethod
def _gemini_usage(response: Any) -> Optional[TokenUsage]:
"""Best-effort usage from a Gemini (Vertex) response.
Gemini reports thinking separately (``thoughts_token_count``); it is
billed at the output rate, so it's folded into output_tokens and also
reported separately for visibility. Returns None on any shape problem.
"""
try:
u = response.usage_metadata
prompt = int(getattr(u, "prompt_token_count", 0) or 0)
candidates = int(getattr(u, "candidates_token_count", 0) or 0)
thoughts = int(getattr(u, "thoughts_token_count", 0) or 0)
cached = int(getattr(u, "cached_content_token_count", 0) or 0)
return TokenUsage(
input_tokens=prompt,
output_tokens=candidates + thoughts,
cache_read_tokens=cached,
thinking_tokens=thoughts,
)
except Exception:
logger.debug("auto-correct: could not read Gemini usage", exc_info=True)
return None
def _call_anthropic(
self, model: str, system_prompt: str, user_prompt: str, *, job_id: str
) -> Any:
) -> tuple[Any, Optional[TokenUsage]]:
import os
import anthropic
@@ -292,9 +482,10 @@ class AutoCorrectService:
raise AutoCorrectServiceError(
"AI model call failed", status_code=502
) from exc
usage = self._anthropic_usage(response)
try:
text = next(b.text for b in response.content if b.type == "text")
return json.loads(text)
return json.loads(text), usage
except (StopIteration, json.JSONDecodeError, TypeError) as exc:
logger.exception(
"auto-correct model returned non-JSON job=%s model=%s", job_id, model
@@ -305,7 +496,7 @@ class AutoCorrectService:
def _call_gemini(
self, model: str, system_prompt: str, user_prompt: str, *, job_id: str
) -> Any:
) -> tuple[Any, Optional[TokenUsage]]:
client = genai.Client(
vertexai=True,
project=self.settings.google_cloud_project,
@@ -333,8 +524,9 @@ class AutoCorrectService:
raise AutoCorrectServiceError(
"AI model call failed", status_code=502
) from exc
usage = self._gemini_usage(response)
try:
return json.loads(response.text)
return json.loads(response.text), usage
except (json.JSONDecodeError, TypeError) as exc:
logger.exception(
"auto-correct model returned non-JSON job=%s model=%s", job_id, model
+11
View File
@@ -59,6 +59,17 @@ class StorageService:
logger.error(f"Error downloading file {source_path}: {e}")
raise
def copy_blob(self, source_path: str, destination_path: str) -> str:
"""Server-side copy of a blob within the bucket (no download/upload)."""
try:
src = self.bucket.blob(source_path)
self.bucket.copy_blob(src, self.bucket, destination_path)
logger.info(f"Copied gs://{settings.gcs_bucket_name}/{source_path} -> {destination_path}")
return destination_path
except Exception as e:
logger.error(f"Error copying blob {source_path} -> {destination_path}: {e}")
raise
def generate_signed_url(self, blob_path: str, expiration_minutes: int = 60) -> str:
"""Generate a signed URL for downloading a file.
+28
View File
@@ -410,6 +410,34 @@ class WorkerService:
async def trigger_screens_worker(self, job_id: str) -> bool:
"""Trigger screen generation worker."""
return await self.trigger_worker("screens", job_id)
async def trigger_auto_correct(self, job_id: str, timeout_seconds: int = 200) -> bool:
"""Trigger proactive auto-correct generation on the API service.
Direct, awaited HTTP call (NOT Cloud Tasks): the endpoint runs the work
synchronously, so awaiting it keeps both the caller (lyrics job) and the
service instance alive until the cache is written. Best-effort — returns
False on any failure and never raises, so it can't affect the job.
"""
if not self._base_url:
logger.info(f"[job:{job_id}] auto-correct trigger skipped: no service base URL")
return False
url = f"{self._base_url}/api/internal/workers/auto-correct"
headers = {"Content-Type": "application/json"}
if self._admin_token:
headers["X-Admin-Token"] = self._admin_token
# Propagate trace context so the service-side span links to this job.
headers = inject_trace_context(headers)
try:
async with httpx.AsyncClient(timeout=timeout_seconds) as client:
resp = await client.post(url, json={"job_id": job_id}, headers=headers)
logger.info(
f"[job:{job_id}] auto-correct trigger -> HTTP {resp.status_code}"
)
return resp.status_code < 400
except Exception as e: # noqa: BLE001 — best-effort, never fatal
logger.warning(f"[job:{job_id}] auto-correct trigger failed (non-fatal): {e}")
return False
def _warmup_encoding_worker(self, job_id: str) -> None:
"""Fire-and-forget warmup of the encoding worker VM.
@@ -0,0 +1,203 @@
"""Tests for the per-job auto-correct suggestion cache."""
from __future__ import annotations
from unittest.mock import patch
from backend.services.auto_correct.service import (
AutoCorrectResult,
AutoCorrectService,
Suggestion,
)
from backend.services.auto_correct.settings import AutoCorrectSettings
SEGMENTS = [
{
"id": "seg-1",
"words": [
{"id": "w0", "text": "straight"},
{"id": "w1", "text": "glory"},
],
},
]
REFS = {"genius": {"segments": [{"text": "straight chlorine"}]}}
RAW = {
"suggestions": [
{
"op": "replace",
"start_idx": 1,
"end_idx": 1,
"new_text": "chlorine",
"reason": "r",
"category": "mishearing",
"confidence": 0.9,
}
]
}
FLAT = [("w0", "straight", "seg-1"), ("w1", "glory", "seg-1")]
def _suggest(service, **overrides):
kwargs = dict(
job_id="job-1",
segments=SEGMENTS,
reference_lyrics=REFS,
artist="A",
title="T",
settings=AutoCorrectSettings(),
)
kwargs.update(overrides)
return service.suggest(**kwargs)
def test_cache_hit_skips_model_call() -> None:
service = AutoCorrectService()
cached_result = AutoCorrectResult(
suggestions=[
Suggestion(
id="cached-1",
op="replace",
word_ids=["w1"],
segment_ids=["seg-1"],
original_text="glory",
new_text="chlorine",
reason="r",
category="mishearing",
confidence=0.9,
)
],
model="claude-fable-5",
elapsed_seconds=0.0,
settings_applied=AutoCorrectSettings(),
cached=True,
)
with patch.object(service, "_cache_get", return_value=cached_result), \
patch.object(service, "_call_model") as call, \
patch.object(service, "_cache_put") as put:
result = _suggest(service)
call.assert_not_called()
put.assert_not_called()
assert result.cached is True
assert result.suggestions[0].id == "cached-1"
def test_cache_miss_calls_model_and_writes_cache() -> None:
service = AutoCorrectService()
with patch.object(service, "_cache_get", return_value=None), \
patch.object(service, "_call_model", return_value=(RAW, None)) as call, \
patch.object(service, "_cache_put") as put:
result = _suggest(service)
call.assert_called_once()
put.assert_called_once()
assert result.cached is False
assert put.call_args.args[1] is result
def test_cache_key_stable_for_identical_input() -> None:
s = AutoCorrectSettings()
k1 = AutoCorrectService._cache_path("j", ["m"], s, FLAT, REFS, "A", "T")
k2 = AutoCorrectService._cache_path("j", ["m"], s, FLAT, REFS, "A", "T")
assert k1 == k2
assert k1.startswith("jobs/j/lyrics/auto_correct_cache/")
def test_cache_key_changes_with_input() -> None:
s = AutoCorrectSettings()
base = AutoCorrectService._cache_path("j", ["m"], s, FLAT, REFS, "A", "T")
edited_words = [("w0", "straight", "seg-1"), ("w1", "chlorine", "seg-1")]
assert AutoCorrectService._cache_path("j", ["m"], s, edited_words, REFS, "A", "T") != base
assert AutoCorrectService._cache_path("j", ["m", "m2"], s, FLAT, REFS, "A", "T") != base
other_settings = AutoCorrectSettings(min_confidence=0.8)
assert AutoCorrectService._cache_path("j", ["m"], other_settings, FLAT, REFS, "A", "T") != base
other_refs = {"genius": {"segments": [{"text": "different text"}]}}
assert AutoCorrectService._cache_path("j", ["m"], s, FLAT, other_refs, "A", "T") != base
def test_cache_get_round_trips_via_storage_payload() -> None:
"""_cache_put's payload must be readable by _cache_get."""
service = AutoCorrectService()
stored = {}
class FakeBlob:
def exists(self):
return bool(stored)
class FakeStorage:
class bucket: # noqa: N801 - mimic attribute access
@staticmethod
def blob(path):
return FakeBlob()
@staticmethod
def upload_json(path, data):
stored[path] = data
@staticmethod
def download_json(path):
return stored[path]
with patch.object(service, "_get_storage", return_value=FakeStorage()):
original = AutoCorrectResult(
suggestions=[
Suggestion(
id="s1",
op="replace",
word_ids=["w1"],
segment_ids=["seg-1"],
original_text="glory",
new_text="chlorine",
reason="r",
category="mishearing",
confidence=0.9,
models=["m1", "m2"],
consensus=2,
total_models=2,
conflict_group=None,
)
],
model="m1, m2",
elapsed_seconds=5.0,
settings_applied=AutoCorrectSettings(compare_models=True),
warnings=["w"],
)
service._cache_put("p", original)
restored = service._cache_get("p")
assert restored is not None
assert restored.cached is True
assert restored.model == "m1, m2"
assert restored.warnings == ["w"]
assert restored.settings_applied == AutoCorrectSettings(compare_models=True)
s = restored.suggestions[0]
assert s.consensus == 2 and s.models == ["m1", "m2"]
def test_corrupt_cache_entry_is_a_miss() -> None:
service = AutoCorrectService()
class FakeBlob:
def exists(self):
return True
class FakeStorage:
class bucket: # noqa: N801
@staticmethod
def blob(path):
return FakeBlob()
@staticmethod
def download_json(path):
return {"suggestions": [{"bogus": True}], "model": "m"}
with patch.object(service, "_get_storage", return_value=FakeStorage()):
assert service._cache_get("p") is None
def test_storage_failure_never_breaks_request() -> None:
service = AutoCorrectService()
with patch.object(service, "_get_storage", side_effect=RuntimeError("no gcs")), \
patch.object(service, "_call_model", return_value=(RAW, None)):
result = _suggest(service)
assert result.cached is False
assert len(result.suggestions) == 1
@@ -49,13 +49,16 @@ def _run_compare(responses_by_model, compare_models_env="model-a;model-b",
resp = responses_by_model[model]
if isinstance(resp, Exception):
raise resp
return resp
# _call_model now returns (parsed_json, token_usage).
return resp, None
with patch.object(
service.settings, "auto_correct_compare_models", compare_models_env
), patch.object(
service.settings, "auto_correct_model", single_model
), patch.object(service, "_call_model", side_effect=fake_call):
), patch.object(service, "_cache_get", return_value=None), \
patch.object(service, "_cache_put"), \
patch.object(service, "_call_model", side_effect=fake_call):
return service.suggest(
job_id="job-1",
segments=SEGMENTS,
@@ -0,0 +1,173 @@
"""Tests for auto-correct token pricing and usage extraction/logging."""
from __future__ import annotations
from types import SimpleNamespace
from unittest.mock import patch
from backend.services.auto_correct.pricing import (
MODEL_PRICING,
estimate_cost_usd,
get_rate,
)
from backend.services.auto_correct.service import AutoCorrectService
from backend.services.auto_correct.settings import AutoCorrectSettings
# ---- pricing ----
def test_estimate_cost_fable_known_rates() -> None:
# 5000 in @ $10/M + 4000 out @ $50/M = 0.05 + 0.20 = 0.25
usage = {
"input_tokens": 5000,
"output_tokens": 4000,
"cache_read_tokens": 0,
"thinking_tokens": None,
}
cost = estimate_cost_usd("claude-fable-5", usage)
assert cost == round(0.05 + 0.20, 10)
def test_estimate_cost_includes_cache_read() -> None:
usage = {
"input_tokens": 1_000_000,
"output_tokens": 0,
"cache_read_tokens": 1_000_000,
"thinking_tokens": None,
}
# 1M input @ $10 + 1M cache_read @ $1 = 11.0
assert estimate_cost_usd("claude-fable-5", usage) == 11.0
def test_estimate_cost_none_usage_returns_none() -> None:
assert estimate_cost_usd("claude-fable-5", None) is None
def test_estimate_cost_unknown_model_returns_none() -> None:
usage = {
"input_tokens": 1000,
"output_tokens": 1000,
"cache_read_tokens": 0,
"thinking_tokens": None,
}
assert estimate_cost_usd("some-unknown-model-9", usage) is None
def test_get_rate_prefix_match_for_dated_snapshot() -> None:
# A dated snapshot id still resolves to its family rate card.
assert get_rate("claude-fable-5-20260601") == MODEL_PRICING["claude-fable-5"]
# ---- usage extraction ----
def test_anthropic_usage_extraction() -> None:
response = SimpleNamespace(
usage=SimpleNamespace(
input_tokens=4321,
output_tokens=3210,
cache_read_input_tokens=100,
)
)
usage = AutoCorrectService._anthropic_usage(response)
assert usage == {
"input_tokens": 4321,
"output_tokens": 3210, # already includes thinking
"cache_read_tokens": 100,
"thinking_tokens": None,
}
def test_gemini_usage_folds_thoughts_into_output() -> None:
response = SimpleNamespace(
usage_metadata=SimpleNamespace(
prompt_token_count=4000,
candidates_token_count=500,
thoughts_token_count=2500,
cached_content_token_count=0,
)
)
usage = AutoCorrectService._gemini_usage(response)
assert usage == {
"input_tokens": 4000,
"output_tokens": 3000, # 500 visible + 2500 thinking
"cache_read_tokens": 0,
"thinking_tokens": 2500,
}
def test_usage_extraction_never_raises_on_bad_shape() -> None:
# Missing usage attribute entirely -> None, not an exception.
assert AutoCorrectService._anthropic_usage(SimpleNamespace()) is None
assert AutoCorrectService._gemini_usage(SimpleNamespace()) is None
# ---- logging ----
SEGMENTS = [
{"id": "seg-1", "words": [{"id": "w0", "text": "glory"}]},
]
REFS = {"genius": {"segments": [{"text": "chlorine"}]}}
def _raw():
return {
"suggestions": [
{
"op": "replace",
"start_idx": 0,
"end_idx": 0,
"new_text": "chlorine",
"reason": "r",
"category": "mishearing",
"confidence": 0.9,
}
]
}
def test_suggest_logs_per_model_and_total_cost(caplog) -> None:
service = AutoCorrectService()
usage = {
"input_tokens": 5000,
"output_tokens": 4000,
"cache_read_tokens": 0,
"thinking_tokens": None,
}
with patch.object(service, "_cache_get", return_value=None), \
patch.object(service, "_cache_put"), \
patch.object(service, "_call_model", return_value=(_raw(), usage)), \
patch.object(service.settings, "auto_correct_model", "claude-fable-5"):
with caplog.at_level("INFO"):
service.suggest(
job_id="job-1",
segments=SEGMENTS,
reference_lyrics=REFS,
artist="A",
title="T",
settings=AutoCorrectSettings(),
)
text = caplog.text
assert "auto-correct usage job=job-1 model=claude-fable-5" in text
assert "input_tokens=5000" in text
assert "output_tokens=4000" in text
assert "est_cost_usd=0.2500" in text
assert "auto-correct cost job=job-1" in text
assert "total_est_cost_usd=0.2500" in text
def test_suggest_logs_unavailable_usage_without_crashing(caplog) -> None:
service = AutoCorrectService()
with patch.object(service, "_cache_get", return_value=None), \
patch.object(service, "_cache_put"), \
patch.object(service, "_call_model", return_value=(_raw(), None)), \
patch.object(service.settings, "auto_correct_model", "claude-fable-5"):
with caplog.at_level("INFO"):
service.suggest(
job_id="job-2",
segments=SEGMENTS,
reference_lyrics=REFS,
artist="A",
title="T",
settings=AutoCorrectSettings(),
)
assert "auto-correct usage job=job-2 model=claude-fable-5 tokens=unavailable" in caplog.text
assert "total_est_cost_usd=unknown" in caplog.text
@@ -35,7 +35,9 @@ REFS = {"genius": {"segments": [{"text": "Sippin' on straight chlorine"}]}}
def _suggest(raw_response, settings=None):
service = AutoCorrectService()
with patch.object(service, "_call_model", return_value=raw_response):
with patch.object(service, "_call_model", return_value=(raw_response, None)), \
patch.object(service, "_cache_get", return_value=None), \
patch.object(service, "_cache_put"):
return service.suggest(
job_id="job-1",
segments=SEGMENTS,
@@ -215,8 +217,8 @@ def test_non_dict_suggestion_entries_dropped() -> None:
def test_call_model_dispatches_claude_to_anthropic() -> None:
service = AutoCorrectService()
with patch.object(service, "_call_anthropic", return_value={"suggestions": []}) as anth, \
patch.object(service, "_call_gemini", return_value={"suggestions": []}) as gem:
with patch.object(service, "_call_anthropic", return_value=({"suggestions": []}, None)) as anth, \
patch.object(service, "_call_gemini", return_value=({"suggestions": []}, None)) as gem:
service._call_model("claude-fable-5", "s", "u", job_id="j")
anth.assert_called_once()
gem.assert_not_called()
@@ -260,8 +262,8 @@ def test_anthropic_schema_strips_genai_pollution(monkeypatch) -> None:
monkeypatch.setattr(anthropic_sdk, "Anthropic", FakeClient)
service = AutoCorrectService()
result = service._call_anthropic("claude-fable-5", "s", "u", job_id="j")
assert result == {"suggestions": []}
raw, _usage = service._call_anthropic("claude-fable-5", "s", "u", job_id="j")
assert raw == {"suggestions": []}
schema = captured["output_config"]["format"]["schema"]
assert "property_ordering" not in schema
assert "property_ordering" not in schema["properties"]["suggestions"]["items"]
+67
View File
@@ -0,0 +1,67 @@
"""
Regression tests for AudioShake leading-padding handling.
Some user-provided audio (e.g. the Vocal Star bulk-batch MP3s) begins with a block of
null bytes before the first ID3/MPEG frame. ffmpeg tolerates it, but AudioShake rejects
the asset with "Error fetching or processing asset" (400 on /tasks). The AudioUploadOptimizer
must detect this and losslessly remux before upload — while leaving clean files and
container formats (.mp4/.mov, which legitimately start with null box-size bytes) untouched.
"""
import os
import tempfile
from unittest.mock import MagicMock, patch
from karaoke_gen.lyrics_transcriber.transcribers.audioshake import AudioUploadOptimizer
def _write(tmp_path, name, head: bytes):
p = os.path.join(tmp_path, name)
with open(p, "wb") as f:
f.write(head + b"\x00" * 2048)
return p
def test_has_leading_padding_detects_null_start(tmp_path):
opt = AudioUploadOptimizer(MagicMock())
padded = _write(str(tmp_path), "padded.mp3", b"\x00\x00\x00\x00")
assert opt._has_leading_padding(padded) is True
def test_has_leading_padding_false_for_id3(tmp_path):
opt = AudioUploadOptimizer(MagicMock())
clean = _write(str(tmp_path), "clean.mp3", b"ID3\x04")
assert opt._has_leading_padding(clean) is False
def test_has_leading_padding_false_for_frame_sync(tmp_path):
opt = AudioUploadOptimizer(MagicMock())
clean = _write(str(tmp_path), "sync.mp3", b"\xff\xfb\xc0\x04")
assert opt._has_leading_padding(clean) is False
def test_padded_mp3_is_remuxed(tmp_path):
opt = AudioUploadOptimizer(MagicMock())
padded = _write(str(tmp_path), "padded.mp3", b"\x00\x00\x00\x00")
with patch.object(opt, "_remux_clean", return_value=("/tmp/clean.mp3", "/tmp/clean.mp3")) as remux:
result = opt.prepare_for_upload(padded)
remux.assert_called_once()
assert result == ("/tmp/clean.mp3", "/tmp/clean.mp3")
def test_clean_mp3_uploaded_directly(tmp_path):
opt = AudioUploadOptimizer(MagicMock())
clean = _write(str(tmp_path), "clean.mp3", b"ID3\x04")
with patch.object(opt, "_remux_clean") as remux:
result = opt.prepare_for_upload(clean)
remux.assert_not_called()
assert result == (clean, None)
def test_container_format_not_remuxed_despite_null_start(tmp_path):
""".mp4/.mov begin with a null box-size prefix — must NOT be treated as padding."""
opt = AudioUploadOptimizer(MagicMock())
mp4 = _write(str(tmp_path), "video.mp4", b"\x00\x00\x00\x20ftyp")
with patch.object(opt, "_remux_clean") as remux:
result = opt.prepare_for_upload(mp4)
remux.assert_not_called()
assert result == (mp4, None)
@@ -0,0 +1,124 @@
"""Tests for proactive auto-correct: the service-side worker + the lyrics-worker trigger.
The work runs on the API service (process_proactive_auto_correct); the lyrics
worker only fires an HTTP trigger. Both must be best-effort: gated by a flag,
never raise, never block, and use the multi-model default settings that line up
with the review UI's request.
"""
from __future__ import annotations
from types import SimpleNamespace
from unittest.mock import AsyncMock, MagicMock, patch
import pytest
from backend.workers.auto_correct_worker import process_proactive_auto_correct
from backend.workers.lyrics_worker import _trigger_proactive_auto_correct
CORRECTIONS = {
"corrected_segments": [
{"id": "seg-1", "words": [{"id": "w0", "text": "glory"}]},
],
"reference_lyrics": {"genius": {"segments": [{"text": "chlorine"}]}},
}
def _settings(enabled: bool):
return SimpleNamespace(auto_correct_proactive_enabled=enabled)
def _patch(enabled=True, corrections=CORRECTIONS, exists=True, service=None, job=None):
"""Patch the dependencies process_proactive_auto_correct imports lazily."""
storage = MagicMock()
storage.file_exists.return_value = exists
storage.download_json.return_value = corrections
jm = MagicMock()
jm.return_value.get_job.return_value = job or SimpleNamespace(artist="A", title="T")
return (
patch("backend.config.get_settings", return_value=_settings(enabled)),
patch("backend.services.storage_service.StorageService", return_value=storage),
patch("backend.services.job_manager.JobManager", jm),
patch("backend.services.auto_correct.get_auto_correct_service",
return_value=service or MagicMock()),
storage,
)
# ---- service-side worker ----
@pytest.mark.asyncio
async def test_disabled_flag_short_circuits() -> None:
p_set, p_st, p_jm, p_svc, storage = _patch(enabled=False)
with p_set, p_st, p_jm, p_svc:
result = await process_proactive_auto_correct("job-1")
assert result == {"status": "disabled"}
storage.file_exists.assert_not_called()
@pytest.mark.asyncio
async def test_skips_when_no_references() -> None:
corr = {"corrected_segments": [{"id": "s", "words": []}], "reference_lyrics": {}}
p_set, p_st, p_jm, p_svc, storage = _patch(corrections=corr)
svc = MagicMock()
with p_set, p_st, p_jm, patch("backend.services.auto_correct.get_auto_correct_service", return_value=svc):
result = await process_proactive_auto_correct("job-1")
assert result["status"] == "skipped"
svc.suggest.assert_not_called()
@pytest.mark.asyncio
async def test_skips_when_no_corrections_file() -> None:
p_set, p_st, p_jm, p_svc, storage = _patch(exists=False)
with p_set, p_st, p_jm, p_svc:
result = await process_proactive_auto_correct("job-1")
assert result["status"] == "skipped"
@pytest.mark.asyncio
async def test_happy_path_runs_multi_model_and_caches() -> None:
svc = MagicMock()
svc.suggest.return_value = SimpleNamespace(
suggestions=[1, 2], model="claude-fable-5, gemini-3.1-pro-preview",
elapsed_seconds=12.3,
)
p_set, p_st, p_jm, _p_svc, storage = _patch(service=svc)
with p_set, p_st, p_jm, patch("backend.services.auto_correct.get_auto_correct_service", return_value=svc):
result = await process_proactive_auto_correct("job-1")
assert result == {"status": "generated", "suggestions": 2}
kwargs = svc.suggest.call_args.kwargs
assert kwargs["job_id"] == "job-1"
assert kwargs["settings"].compare_models is True
assert kwargs["artist"] == "A"
assert kwargs["segments"] == CORRECTIONS["corrected_segments"]
@pytest.mark.asyncio
async def test_swallows_service_errors() -> None:
svc = MagicMock()
svc.suggest.side_effect = RuntimeError("anthropic down / out of credits")
p_set, p_st, p_jm, _p_svc, storage = _patch(service=svc)
with p_set, p_st, p_jm, patch("backend.services.auto_correct.get_auto_correct_service", return_value=svc):
result = await process_proactive_auto_correct("job-1") # must not raise
assert result["status"] == "error"
# ---- lyrics-worker trigger ----
@pytest.mark.asyncio
async def test_lyrics_worker_fires_trigger() -> None:
ws = MagicMock()
ws.trigger_auto_correct = AsyncMock(return_value=True)
with patch("backend.services.worker_service.WorkerService", return_value=ws):
await _trigger_proactive_auto_correct("job-1", MagicMock())
ws.trigger_auto_correct.assert_awaited_once_with("job-1")
@pytest.mark.asyncio
async def test_lyrics_worker_trigger_swallows_errors() -> None:
ws = MagicMock()
ws.trigger_auto_correct = AsyncMock(side_effect=RuntimeError("network down"))
job_log = MagicMock()
with patch("backend.services.worker_service.WorkerService", return_value=ws):
await _trigger_proactive_auto_correct("job-1", job_log) # must not raise
job_log.warning.assert_called()
+38
View File
@@ -365,6 +365,44 @@ class TestCompleteReviewZeroSegmentValidation:
assert response.status_code == 200
def test_existing_instrumental_defaults_selection_to_custom(self, _patched_client):
"""Jobs that supplied their own instrumental (tenant/existing_instrumental flow)
have no instrumental-selection UI step, so complete-review must default the
selection to 'custom' — otherwise the render defaults to 'clean' (a separated
stem that was never produced) and fails the prerequisite check."""
client, mock_jm = _patched_client
job = self._make_job(state_data={'lyrics_metadata': {'segment_count': 5}})
job.existing_instrumental_gcs_path = "uploads/job-zero-seg/audio/existing_instrumental.mp3"
mock_jm.get_job.return_value = job
response = client.post(
"/api/jobs/job-zero-seg/complete-review",
headers={"Authorization": "Bearer test-admin-token"},
)
assert response.status_code == 200
mock_jm.update_state_data.assert_any_call(
"job-zero-seg", "instrumental_selection", "custom"
)
def test_existing_instrumental_does_not_override_explicit_selection(self, _patched_client):
"""An explicit instrumental_selection in the request still wins over the default."""
client, mock_jm = _patched_client
job = self._make_job(state_data={'lyrics_metadata': {'segment_count': 5}})
job.existing_instrumental_gcs_path = "uploads/job-zero-seg/audio/existing_instrumental.mp3"
mock_jm.get_job.return_value = job
response = client.post(
"/api/jobs/job-zero-seg/complete-review",
headers={"Authorization": "Bearer test-admin-token"},
json={"instrumental_selection": "clean"},
)
assert response.status_code == 200
mock_jm.update_state_data.assert_any_call(
"job-zero-seg", "instrumental_selection", "clean"
)
class TestPreviewStyleLoading:
"""Tests for the unified style loader used in preview video generation.
+51
View File
@@ -545,6 +545,57 @@ class TestCreateJobFromSearch:
assert job_create.artist == "Abba (Display)"
assert job_create.title == "Waterloo (Karaoke)"
def test_corrected_artist_title_wins_over_session_query(self, create_from_search_client, auth_headers):
"""Regression: when the user clicks "Use official formatting", the corrected
artist/title sent in the request body must win over the original (raw) search
query stored in the session. Previously the job was named with the raw query,
so the official formatting selection was silently ignored."""
# Session was created from the raw lowercase query the user typed...
raw_session = _make_search_session(user_email="test@example.com")
raw_session["artist"] = "hard-fi"
raw_session["title"] = "hard to beat"
create_from_search_client._mock_firestore.get_search_session.return_value = raw_session
create_from_search_client._mock_firestore.consume_search_session.return_value = raw_session
# ...then the user picked the official formatting, so the frontend sends the
# corrected artist/title (no separate display override).
create_from_search_client.post(
"/api/jobs/create-from-search",
json={
"search_session_id": "sess-abc-123",
"selection_index": 0,
"artist": "Hard-Fi",
"title": "Hard to Beat",
},
headers=auth_headers,
)
call_args = create_from_search_client._mock_jm.create_job.call_args
job_create = call_args[0][0]
assert job_create.artist == "Hard-Fi"
assert job_create.title == "Hard to Beat"
# The original query is still preserved for audio-search matching metadata.
assert job_create.audio_search_artist == "hard-fi"
assert job_create.audio_search_title == "hard to beat"
def test_blank_body_artist_title_falls_back_to_session_query(self, create_from_search_client, auth_headers):
"""Whitespace-only artist/title in the body must not become the job name —
fall back to the stored search query instead."""
create_from_search_client.post(
"/api/jobs/create-from-search",
json={
"search_session_id": "sess-abc-123",
"selection_index": 0,
"artist": " ",
"title": "\t",
},
headers=auth_headers,
)
call_args = create_from_search_client._mock_jm.create_job.call_args
job_create = call_args[0][0]
# Session stores "ABBA" / "Waterloo" (see _make_search_session).
assert job_create.artist == "ABBA"
assert job_create.title == "Waterloo"
def test_session_consumed_atomically(self, create_from_search_client, auth_headers):
"""Session is consumed (atomically read+deleted) via consume_search_session."""
create_from_search_client.post(
+28 -1
View File
@@ -38,9 +38,36 @@ class TestStorageServiceInit:
assert service.bucket == mock_bucket
class TestStorageServiceCopy:
"""Test server-side copy (used to stage the tenant instrumental for the GCE encoder)."""
@patch("backend.services.storage_service.storage.Client")
@patch("backend.services.storage_service.settings")
def test_copy_blob(self, mock_settings, mock_client_class):
mock_settings.gcs_bucket_name = "test-bucket"
mock_src_blob = Mock()
mock_bucket = Mock()
mock_bucket.blob.return_value = mock_src_blob
mock_client = Mock()
mock_client.bucket.return_value = mock_bucket
mock_client_class.return_value = mock_client
service = StorageService()
result = service.copy_blob(
"uploads/job123/audio/existing_instrumental.mp3",
"jobs/job123/existing_instrumental.mp3",
)
mock_bucket.blob.assert_called_once_with("uploads/job123/audio/existing_instrumental.mp3")
mock_bucket.copy_blob.assert_called_once_with(
mock_src_blob, mock_bucket, "jobs/job123/existing_instrumental.mp3"
)
assert result == "jobs/job123/existing_instrumental.mp3"
class TestStorageServiceUpload:
"""Test upload operations."""
@patch("backend.services.storage_service.storage.Client")
@patch("backend.services.storage_service.settings")
def test_upload_file(self, mock_settings, mock_client_class):
+91 -8
View File
@@ -56,6 +56,43 @@ def _make_job_mock(**kwargs):
return job
class TestSelectMixedAudioFiles:
"""Regression tests for _select_mixed_audio_files() in file_upload.py.
The existing-instrumental file shares the uploads/{job}/audio/ directory with the
mixed audio, so the 'audio/' prefix matches both. Before the fix, files[0] resolved to
'existing_instrumental.mp3' (it sorts first) and transcription ran on the instrumental.
"""
def _fn(self):
from backend.api.routes.file_upload import _select_mixed_audio_files
return _select_mixed_audio_files
def test_excludes_existing_instrumental(self):
fn = self._fn()
# Listing is sorted alphabetically by GCS, so the instrumental comes first.
files = [
"uploads/job123/audio/existing_instrumental.mp3",
"uploads/job123/audio/mixed.mp3",
]
result = fn(files)
assert result == ["uploads/job123/audio/mixed.mp3"]
assert result[0] == "uploads/job123/audio/mixed.mp3"
def test_plain_audio_only_unchanged(self):
fn = self._fn()
files = ["uploads/job123/audio/My Song.flac"]
assert fn(files) == files
def test_real_filenames_with_instrumental(self):
fn = self._fn()
files = [
"uploads/job123/audio/existing_instrumental.mp3",
"uploads/job123/audio/Eddy Grant - I Don't Wanna Dance Guide.mp3",
]
assert fn(files) == ["uploads/job123/audio/Eddy Grant - I Don't Wanna Dance Guide.mp3"]
class TestApplyTenantOverrides:
"""Tests for _apply_tenant_overrides() in file_upload.py."""
@@ -125,24 +162,70 @@ class TestApplyTenantOverrides:
_, _, _, yt_upload = apply_fn(dist, tenant_config, "default", False, True)
assert yt_upload is False
def test_request_values_take_precedence(self):
"""Explicit request-level values are not overridden by tenant defaults."""
def test_tenant_config_overrides_global_defaults(self):
"""Tenant config is authoritative: it overrides any global/consumer default
distribution settings already seeded into `dist`.
Regression guard: prod sets DEFAULT_DROPBOX_PATH / DEFAULT_GDRIVE_FOLDER_ID /
DEFAULT_BRAND_PREFIX globally, which get_effective_distribution_settings seeds
into `dist`. If tenant overrides only filled in *unset* fields, every tenant job
would leak into the shared consumer Dropbox folder and global Google Drive.
"""
apply_fn = self._get_apply_fn()
tenant_config = _make_tenant_config()
# `dist` arrives pre-seeded with the GLOBAL consumer defaults.
dist = EffectiveDistributionSettings(
dropbox_path="/Custom/Path",
gdrive_folder_id="custom-folder",
dropbox_path="/MediaUnsynced/Karaoke/Tracks-Organized", # global default
gdrive_folder_id="global-consumer-folder", # global default
discord_webhook_url=None,
brand_prefix="CUSTOM",
brand_prefix="NOMAD", # global default
enable_youtube_upload=True,
youtube_description=None,
)
new_dist, _, _, _ = apply_fn(dist, tenant_config, "default", False, True)
assert new_dist.brand_prefix == "CUSTOM"
assert new_dist.dropbox_path == "/Custom/Path"
assert new_dist.gdrive_folder_id == "custom-folder"
# Tenant config wins on every distribution field.
assert new_dist.brand_prefix == "VSTAR"
assert new_dist.dropbox_path == "/Karaoke/Vocal-Star"
assert new_dist.gdrive_folder_id == "gdrive-folder-123"
def test_gdrive_disabled_clears_global_default(self):
"""When the tenant disables gdrive_upload, the global default GDrive folder is
cleared so the tenant job never publishes to Google Drive (the B2B requirement)."""
apply_fn = self._get_apply_fn()
# Tenant has a gdrive folder configured but the feature is OFF — the disabled
# flag must win, clearing both the configured folder and any global default.
tenant_config = _make_tenant_config()
tenant_config.features.gdrive_upload = False
dist = EffectiveDistributionSettings(
dropbox_path=None,
gdrive_folder_id="global-consumer-folder", # would otherwise leak
discord_webhook_url=None,
brand_prefix=None,
enable_youtube_upload=True,
youtube_description=None,
)
new_dist, _, _, yt_upload = apply_fn(dist, tenant_config, "default", False, True)
assert new_dist.gdrive_folder_id is None
assert yt_upload is False
def test_dropbox_disabled_clears_path(self):
"""When the tenant disables dropbox_upload, the Dropbox path is cleared."""
apply_fn = self._get_apply_fn()
tenant_config = _make_tenant_config()
tenant_config.features.dropbox_upload = False
dist = EffectiveDistributionSettings(
dropbox_path="/MediaUnsynced/Karaoke/Tracks-Organized",
gdrive_folder_id=None, discord_webhook_url=None,
brand_prefix=None, enable_youtube_upload=True, youtube_description=None,
)
new_dist, _, _, _ = apply_fn(dist, tenant_config, "default", False, True)
assert new_dist.dropbox_path is None
def test_no_tenant_config_passthrough(self):
"""When no tenant config, all values pass through unchanged."""
+83
View File
@@ -0,0 +1,83 @@
"""Proactive auto-correct generation, run on the API service.
The lyrics worker (a Cloud Run Job) triggers this via the internal endpoint
once transcription + references are ready. It runs HERE — on the API service —
rather than in the lyrics job, because the service already has a working
ANTHROPIC_API_KEY + AUTO_CORRECT_COMPARE_MODELS configuration (the lyrics job's
secrets use Cloud Run secret aliases that `gcloud run jobs update
--update-secrets` can't extend; see docs/archive/2026-06-11-proactive-autocorrect-plan.md).
Pre-generates + caches the multi-model suggestion run so the review UI's
on-load request is an instant cache hit. Best-effort: it must never raise — a
failure just means the UI does the call on demand instead.
"""
from __future__ import annotations
import asyncio
import logging
logger = logging.getLogger(__name__)
async def process_proactive_auto_correct(job_id: str) -> dict:
"""Generate + cache auto-correct suggestions for a job. Never raises.
Returns a small status dict for the endpoint to echo. Gated by
settings.auto_correct_proactive_enabled; reads the corrections.json the
lyrics worker just wrote (the same data the review UI loads on first open)
and runs the multi-model path with default settings so the cache key lines
up with the UI request.
"""
from backend.config import get_settings
settings = get_settings()
if not settings.auto_correct_proactive_enabled:
return {"status": "disabled"}
try:
from backend.services.auto_correct import get_auto_correct_service
from backend.services.auto_correct.settings import AutoCorrectSettings
from backend.services.job_manager import JobManager
from backend.services.storage_service import StorageService
storage = StorageService()
corrections_path = f"jobs/{job_id}/lyrics/corrections.json"
if not storage.file_exists(corrections_path):
logger.info("[job:%s] proactive auto-correct skipped: no corrections.json", job_id)
return {"status": "skipped", "reason": "no_corrections"}
data = storage.download_json(corrections_path)
segments = data.get("corrected_segments") or data.get("segments") or []
reference_lyrics = data.get("reference_lyrics") or {}
if not segments or not reference_lyrics:
# No references → nothing to compare against. The reviewer can paste
# references in the UI and trigger auto-correct manually later.
logger.info(
"[job:%s] proactive auto-correct skipped: %d segments, %d ref sources",
job_id, len(segments), len(reference_lyrics),
)
return {"status": "skipped", "reason": "no_references"}
job = JobManager().get_job(job_id)
service = get_auto_correct_service()
result = await asyncio.wait_for(
asyncio.to_thread(
service.suggest,
job_id=job_id,
segments=segments,
reference_lyrics=reference_lyrics,
artist=getattr(job, "artist", None) if job else None,
title=getattr(job, "title", None) if job else None,
# Must match what the review UI sends (default settings,
# multi-model) or the cache key won't line up.
settings=AutoCorrectSettings(compare_models=True),
),
timeout=180,
)
logger.info(
"[job:%s] proactive auto-correct done: %d suggestions cached (models=%s, %.1fs)",
job_id, len(result.suggestions), result.model, result.elapsed_seconds,
)
return {"status": "generated", "suggestions": len(result.suggestions)}
except Exception as e: # noqa: BLE001 — proactive is best-effort, never fatal
logger.warning("[job:%s] proactive auto-correct failed (non-fatal): %s", job_id, e, exc_info=True)
return {"status": "error", "message": str(e)}
+29 -1
View File
@@ -170,6 +170,26 @@ def create_lyrics_processor(
)
async def _trigger_proactive_auto_correct(job_id, job_log) -> None:
"""Trigger proactive auto-correct generation on the API service.
The actual multi-model LLM call + caching runs on the API service (which
has the working Anthropic key / compare-models config) — see
backend/workers/auto_correct_worker.py. Here we just fire the HTTP trigger
and await it. Best-effort and fully isolated: it must NEVER raise, fail the
job, or block the pipeline — downstream stages are already triggered before
this runs, and the service gates the work behind AUTO_CORRECT_PROACTIVE_ENABLED.
"""
try:
from backend.services.worker_service import WorkerService
ok = await WorkerService().trigger_auto_correct(job_id)
job_log.info("Proactive auto-correct trigger %s", "ok" if ok else "skipped/failed")
except Exception as e: # noqa: BLE001 — never let auto-correct affect the job
job_log.warning(f"Proactive auto-correct trigger failed (non-fatal): {e}")
logger.warning(f"[job:{job_id}] Proactive auto-correct trigger failed (non-fatal): {e}")
async def process_lyrics_transcription(job_id: str) -> bool:
"""
Process lyrics transcription and correction for a job using karaoke_gen.LyricsProcessor.
@@ -516,7 +536,15 @@ async def process_lyrics_transcription(job_id: str) -> bool:
# This will check if audio is also complete and transition to next stage if so
job_log.info("Lyrics worker complete, checking if audio is also done...")
job_manager.mark_lyrics_complete(job_id)
# Proactively pre-generate + cache AI auto-correct suggestions so
# they're ready when the reviewer opens the lyrics UI. The work
# runs on the API service (it has the Anthropic key); we just fire
# the trigger here. Done AFTER mark_lyrics_complete (downstream is
# already triggered, so this never blocks it) and fully isolated —
# it can never fail or delay the job beyond its own timeout.
await _trigger_proactive_auto_correct(job_id, job_log)
duration = time.time() - start_time
# Store worker-level timing
job_manager.update_processing_metadata(job_id, "timing.lyrics_worker_seconds", round(duration, 1))
+15
View File
@@ -107,6 +107,21 @@ async def _encode_via_gce(
instrumental_selection = job.state_data.get('instrumental_selection', 'clean')
existing_instrumental = getattr(job, 'existing_instrumental_gcs_path', None)
# Stage the user-provided instrumental into the encoder's input prefix (jobs/{job_id}/).
# It is uploaded under uploads/, which the GCE encoder does NOT pull via input_gcs_path;
# copying it here makes the encoder's recursive find_file("*existing_instrumental*")
# locate it regardless of the worker image version (older encoder images predate the
# encoding_config "existing_instrumental" download path). Without this, tenant /
# existing-instrumental jobs fail with "No instrumental audio found".
if existing_instrumental:
try:
ext = os.path.splitext(existing_instrumental)[1].lower() or ".mp3"
staged_path = f"jobs/{job_id}/existing_instrumental{ext}"
storage.copy_blob(existing_instrumental, staged_path)
job_log.info(f"Staged existing instrumental for encoder: {staged_path}")
except Exception as e:
job_log.warning(f"Failed to stage existing instrumental into jobs/ prefix: {e}")
encoding_config = {
"formats": ["mp4_4k_lossless", "mp4_4k_lossy", "mp4_720p"],
"base_name": base_name,
+25 -7
View File
@@ -560,20 +560,29 @@ Content-Type: application/json
"suggest_adlib_removal": true,
"allow_insertions": true,
"min_confidence": 0.0,
"compare_models": false
"compare_models": true
}
}
```
Opt-in, user-triggered AI correction suggestions for the lyrics review UI.
Stateless: one whole-song LLM call per model (default model from
`AUTO_CORRECT_MODEL`; Claude models use the Anthropic API via the
AI correction suggestions for the lyrics review UI. Stateless: one whole-song
LLM call per model (Claude models use the Anthropic API via the
`anthropic-api-key` secret, Gemini models use Vertex AI) compares the
client's current transcription against the reference sources and returns
word-id-keyed suggestions. Nothing is applied server-side — the reviewer
accepts/rejects each suggestion in the UI and persistence flows through the
existing corrections/complete paths.
The review UI always requests the multi-model path (`compare_models: true`)
and auto-runs once on load, so suggestions appear without a click. To make
that load instant, suggestions are **proactively pre-generated and cached**
once transcription + references are ready: the lyrics worker fires an internal
trigger (`POST /api/internal/workers/auto-correct`) that runs the same
multi-model generation on the API service (gated by
`AUTO_CORRECT_PROACTIVE_ENABLED`; best-effort — it never blocks or fails the
karaoke job). Because the proactive run uses the same default settings the UI
sends, the on-load request is normally a cache hit with no extra cost.
With `"compare_models": true`, every model in `AUTO_CORRECT_COMPARE_MODELS`
(semicolon-separated) is queried in parallel; identical suggestions are
deduplicated with a per-suggestion `consensus` count, and suggestions that
@@ -597,19 +606,28 @@ Returns:
"reason": "All references read 'chlorine' here",
"category": "mishearing",
"confidence": 0.95,
"models": ["claude-fable-5", "gemini-3.1-pro-preview"],
"models": ["claude-opus-4-8", "gemini-3.1-pro-preview"],
"consensus": 2,
"total_models": 2,
"conflict_group": null
}
],
"model": "claude-fable-5, gemini-3.1-pro-preview",
"model": "claude-opus-4-8, gemini-3.1-pro-preview",
"elapsed_seconds": 27.4,
"settings_applied": { "suggest_adlib_removal": true, "allow_insertions": true, "min_confidence": 0.0 },
"warnings": []
"warnings": [],
"cached": false
}
```
Results are cached per job in GCS
(`jobs/{job_id}/lyrics/auto_correct_cache/{hash}.json`), keyed on the exact
input: word ids + texts, reference lyrics texts, settings, and the resolved
model list. Re-running on unmodified lyrics returns the previous result with
`"cached": true` and incurs no LLM cost; any edit to the lyrics, references,
or settings produces a new key and a fresh run. Cache reads/writes are
best-effort — storage failures degrade to a normal uncached run.
`op` is `replace` | `delete` | `insert_after` (for `insert_after`, `word_ids`
holds the anchor word). Errors: `422` when no reference lyrics are available,
`400` for invalid settings, `502` when the model call fails or returns
@@ -0,0 +1,82 @@
# Proactive AI Auto-Correction + UI De-AI-ification
**Date:** 2026-06-11
**Branch:** `feat/sess-20260611-1514-autocorrect-cost-logging`
**Context:** Measured cost ~$0.13/track (multi-model). Cheap enough to run on every job.
## Goal (user's words)
Run multi-model auto-correction automatically on every karaoke job so suggestions
are ready to review/approve/reject by the time anyone reaches the lyrics review UI.
Must fail gracefully — never block the karaoke job if AI APIs are flaky / out of
credits. Remove all "AI"/"model" mentions from the review UI; button becomes just
"Auto-correct"; drop the user-configurable model selection and always use multi-model.
Keep the button for the case where references arrive later (user pastes reference
lyrics during review, then clicks it).
## Architecture decisions (validated against the codebase)
1. **Where proactive runs: the `lyrics-transcription-job` Cloud Run Job**, after
`mark_lyrics_complete()` (so downstream screens/render are already triggered and
are NOT blocked), awaited (a fire-and-forget task would die when the job
entrypoint returns). The job is long-lived, so an extra ~15-30s is fine and the
process stays alive to finish the cache write.
2. **Cache alignment = the whole point.** `AutoCorrectService` already writes a
per-job GCS cache keyed on (models, settings, word-id+text list, ref texts,
artist, title). If the proactive run uses the SAME inputs + settings + models the
UI will send, the UI's on-load call is a **cache hit** (instant, no second spend).
- Proactive settings = `AutoCorrectSettings(compare_models=True)` (all other
fields default). Backend defaults == frontend `DEFAULT_AUTO_CORRECT_SETTINGS`
once we flip `compare_models` to `true`. Both paths build settings server-side
and hash the same dict.
- `models` is derived server-side identically in both paths via `_models_for()`.
- Proactive reads `corrections.json` (corrected_segments + reference_lyrics) — the
exact data the review-data endpoint serves on first load (before any edits).
3. **Env/secret wiring (REQUIRED for it to actually work).** The lyrics job currently
has neither `ANTHROPIC_API_KEY` nor `AUTO_CORRECT_*`. It uses the SAME SA as the
API service (`karaoke-backend@…`), which already reads `anthropic-api-key`
(project-level secret access) — so adding the secret to the job is low-risk.
Add via `--update-env-vars`/`--update-secrets` in the ci.yml job-update step
(merges, doesn't wipe the existing 12 vars).
4. **Feature flag:** `auto_correct_proactive_enabled` (config), default **false** in
code, set `AUTO_CORRECT_PROACTIVE_ENABLED=true` on the lyrics job via ci.yml.
5. **UI auto-run on load:** on review load, if references exist, auto-invoke
auto-correct (cache hit → instant). Keep the button for manual re-run after the
user pastes references. Always send `compare_models: true`.
## Changes
### Backend
- `backend/config.py`: add `auto_correct_proactive_enabled`.
- `backend/workers/lyrics_worker.py`: after `mark_lyrics_complete`, await a guarded
helper `_run_proactive_auto_correct(job_id, ...)` — loads corrections.json, calls
`suggest(..., settings=AutoCorrectSettings(compare_models=True))`, `asyncio.wait_for`
timeout, swallow ALL exceptions (log only). Never affects job status.
- Tests: worker test that it's gated by the flag, swallows errors, and skips when no
references.
### Infra
- `.github/workflows/ci.yml`: lyrics-transcription-job update step gains
`--update-env-vars "AUTO_CORRECT_MODEL=claude-fable-5,AUTO_CORRECT_COMPARE_MODELS=claude-fable-5;gemini-3.1-pro-preview,AUTO_CORRECT_PROACTIVE_ENABLED=true"`
and `--update-secrets "ANTHROPIC_API_KEY=anthropic-api-key:latest"`.
### Frontend (`frontend/`, next-intl, 33 locales)
- Always multi-model: `DEFAULT_AUTO_CORRECT_SETTINGS.compare_models = true`; remove
the compare/model toggle from `AutoCorrectModal.tsx`.
- Strip model attribution: remove model-name badge + consensus "X/Y models" badge in
`AutoCorrectPanel.tsx`; reword the conflict badge to not mention models (keep the
conflict-resolution behavior).
- Rename button to "Auto-correct"; remove "AI"/"model" from all related strings.
- Auto-run on review load when references exist (cache hit → instant); keep button.
- i18n: edit `messages/en.json`, then `python frontend/scripts/translate.py
--messages-dir frontend/messages --target all` for all 33 locales.
- Update `e2e/production/auto-correct-suggestions.spec.ts` button selector.
## Failure modes (all non-blocking by design)
- Anthropic down / no credits → claude call raises, caught; Gemini result still cached
(multi-model degrades to whatever answered). UI on-load call same behaviour.
- Both providers fail → proactive logs warning, job proceeds normally; UI on-load call
returns 502 and the panel shows nothing (or the manual button can retry later).
- Proactive task times out → `wait_for` cancels it, job proceeds.
- No references at lyrics-complete time → proactive skipped; user pastes refs in UI →
clicks button → on-demand call.
@@ -0,0 +1,83 @@
# White-Label Tenant Portals: Made Working End-to-End (Jun 2026)
## Context
The two B2B white-label tenant portals (`vocalstar.nomadkaraoke.com`, `singa.nomadkaraoke.com`)
had full data models, middleware, GCS config, themes, a simplified job form, a separate
Cloudflare deployment, and 280+ unit tests — and were documented as "production ready."
**But no tenant job had ever actually completed:** 0 of the 484 most recent prod jobs
carried a `tenant_id`. The feature looked done but was broken at every stage that had
never been exercised by a real end-to-end tenant job.
This session drove a real Vocal Star track (`Eddy Grant - I Don't Wanna Dance`, from their
bulk batch) through the full pipeline in production, fixing each blocker in turn, until a
tenant job completed: correct attribution → transcription → screens → review → render →
Dropbox delivery, with the locked theme and **no** YouTube / Google Drive.
## The seven blockers (each was the next never-exercised stage)
1. **Tenant attribution never happened (root cause).** The frontend API client never sent
the `X-Tenant-ID` header (`getTenantHeaders()` existed but was unwired). Tenant portals
call the shared `api.nomadkaraoke.com`, whose Host isn't the tenant subdomain, and the
`?tenant=` param is prod-disabled — so the backend never detected the tenant and every
sign-in/job silently became a consumer job. Fix: attach `X-Tenant-ID` from
`window.__TENANT_CONFIG__` in `lib/api.ts` (`getBaseHeaders`), incl. the magic-link
request. PR #824.
2. **Tenant config not authoritative.** Prod sets global `DEFAULT_DROPBOX_PATH` /
`DEFAULT_GDRIVE_FOLDER_ID` / `DEFAULT_BRAND_PREFIX`; `_apply_tenant_overrides` only
filled unset fields, so tenant jobs leaked into the shared consumer Dropbox folder and
uploaded to the global Google Drive. Fix: tenant config is authoritative, gated by
feature flags (gdrive/dropbox cleared when disabled). PR #824.
3. **Wrong file transcribed.** existing-instrumental jobs upload mixed + instrumental into
the same `uploads/{job}/audio/` dir; `uploads-complete` resolved the `audio` slot via
`files[0]`, which sorts to `existing_instrumental.mp3`. Transcription ran on the
instrumental. Fix: `_select_mixed_audio_files` excludes the instrumental. PR #825.
4. **AudioShake rejected the audio.** Vocal Star's MP3s begin with ~731 leading null bytes
before the first frame; ffmpeg tolerates it, AudioShake 400s ("Error fetching or
processing asset"). Consumer jobs never hit this (they transcribe re-encoded stems).
Fix: detect leading null padding on `.mp3/.aac` and losslessly remux (`ffmpeg -c copy`)
before upload. Verified against the live AudioShake API. PR #826.
5. **Theme incomplete.** The strict theme validator requires every field; the tenant
themes (created Jan 2026) were missing `extra_text_text_transform` (intro + end),
added to the schema later → "Title screen generation failed." Fix: added the field to
the live GCS themes and the setup scripts. PR #827.
6. **Theme assets not downloaded.** The setup scripts wrote full `gs://bucket/themes/.../assets/X`
URLs, but `theme_service._build_style_assets_mapping` only resolves bare basenames (the
consumer convention) → `style_assets` empty → assets never localized → encoder failed
with "Video background image not found". Fix: rewrote the live themes + setup scripts to
bare basenames. PR #827.
7. **Render prerequisites — "No instrumental selected".** existing-instrumental jobs have
no instrumental-selection UI step; the orchestrator defaults to `'clean'` (a stem never
produced) and `_validate_prerequisites` rejected the job. Fix: `complete-review`
defaults `instrumental_selection` to `'custom'` when `existing_instrumental_gcs_path`
is set. PR #827.
## Tenant config (final, both tenants)
- Locked theme (`vocalstar` / `singa`), no theme selection.
- `youtube_upload=false`, `gdrive_upload=false` (folder cleared), `dropbox_upload=true`.
- Dropbox: `/MediaUnsynced/Karaoke/Tracks-VocalStar`, `/MediaUnsynced/Karaoke/Tracks-Singa`.
- Jobs forced `is_private=true`; CDG + 4K enabled.
## Daily E2E
`scripts/e2e/tenant_e2e.py` + `.github/workflows/e2e-tenant-daily.yml` run a full job per
tenant daily (07:37 UTC, matrix vocalstar/singa): submit → approve review → render →
assert (completes, Dropbox link present, no YouTube, downloads available) → clean up the
job + uploads. Auth via WIF + `E2E_ADMIN_TOKEN`; test audio in `gs://.../e2e-tests/shared/`.
## Gotchas / lessons
- The tenant pipeline had never run end-to-end, so every stage hid a latent bug. "Has a
real job of this shape ever completed in prod?" is a better readiness question than test
count.
- Theme asset paths must be **bare basenames** (consumer convention), not `gs://` URLs.
- AudioShake needs clean audio at offset 0; user-provided files vary — remux defensively.
- Public tenant config API redacts `dropbox_path`/`gdrive_folder_id`/`brand_prefix`; read
the stored GCS config for the real values.
@@ -0,0 +1,96 @@
/**
* @jest-environment jsdom
*
* Tests that the API client attaches the X-Tenant-ID header on white-label tenant
* portals (sourced from window.__TENANT_CONFIG__) and omits it on the consumer build.
*
* Regression guard for the root-cause bug: the frontend never sent X-Tenant-ID, so the
* shared api.nomadkaraoke.com backend could not detect the tenant and every tenant-portal
* job/sign-in silently fell back to consumer behavior (0 tenant jobs ever ran in prod).
*/
import { api, getTenantId } from '@/lib/api'
function setEdgeTenant(id: string | null) {
if (id) {
;(window as any).__TENANT_CONFIG__ = {
tenant: { id, name: id, subdomain: `${id}.nomadkaraoke.com` },
is_default: false,
}
} else {
delete (window as any).__TENANT_CONFIG__
}
}
describe('getTenantId', () => {
afterEach(() => setEdgeTenant(null))
it('returns null when no tenant config is present (consumer build)', () => {
setEdgeTenant(null)
expect(getTenantId()).toBeNull()
})
it('returns the tenant id from window.__TENANT_CONFIG__', () => {
setEdgeTenant('vocalstar')
expect(getTenantId()).toBe('vocalstar')
})
it('returns null when the injected config has no tenant (default/consumer domain)', () => {
;(window as any).__TENANT_CONFIG__ = { tenant: null, is_default: true }
expect(getTenantId()).toBeNull()
})
})
describe('X-Tenant-ID header attachment', () => {
const fetchMock = jest.fn()
beforeEach(() => {
fetchMock.mockReset()
;(global as any).fetch = fetchMock
fetchMock.mockResolvedValue({ ok: true, json: async () => ({}) })
})
afterEach(() => setEdgeTenant(null))
it('attaches X-Tenant-ID to authenticated requests (createJobWithUploadUrls) on a tenant portal', async () => {
setEdgeTenant('vocalstar')
window.localStorage.setItem('karaoke_access_token', 'tok-123')
fetchMock.mockResolvedValue({
ok: true,
json: async () => ({ job_id: 'j1', upload_urls: [] }),
})
await api.createJobWithUploadUrls('Adele', 'Hello', [], {
is_private: true,
existing_instrumental: true,
})
const [, init] = fetchMock.mock.calls[0]
expect(init.headers['X-Tenant-ID']).toBe('vocalstar')
expect(init.headers['Authorization']).toBe('Bearer tok-123')
window.localStorage.removeItem('karaoke_access_token')
})
it('attaches X-Tenant-ID to the magic-link request on a tenant portal', async () => {
setEdgeTenant('singa')
fetchMock.mockResolvedValue({ ok: true, json: async () => ({ success: true }) })
await api.sendMagicLink('user@singa.com')
const [url, init] = fetchMock.mock.calls[0]
expect(url).toMatch(/\/api\/users\/auth\/magic-link$/)
expect(init.headers['X-Tenant-ID']).toBe('singa')
})
it('does NOT attach X-Tenant-ID on the consumer build', async () => {
setEdgeTenant(null)
fetchMock.mockResolvedValue({ ok: true, json: async () => ({ success: true }) })
await api.sendMagicLink('user@example.com')
const [, init] = fetchMock.mock.calls[0]
expect(init.headers['X-Tenant-ID']).toBeUndefined()
})
})
@@ -384,6 +384,12 @@ export function AudioEditor({ job }: AudioEditorProps) {
? (audioInfo?.original_duration_seconds ?? 0)
: (audioInfo?.current_duration_seconds ?? 0)
// Trim/Fade are edge actions — only valid when the selection touches the
// very start or very end of the track (1s tolerance, matching the
// server-side anchoring in audio_edit_service.fade_region).
const atStartEdge = !!selection && selection.startSeconds < 1
const atEndEdge = !!selection && selection.endSeconds > currentDuration - 1
// ─── Auto-save ─────────────────────────────────────────────────
const { saveSession } = useAudioEditAutoSave({
@@ -884,54 +890,52 @@ export function AudioEditor({ job }: AudioEditorProps) {
{formatTimePrecise(selection.startSeconds)} - {formatTimePrecise(selection.endSeconds)}
({formatTimePrecise(selection.endSeconds - selection.startSeconds)})
</span>
{selection.startSeconds < 1 && (
<Button
variant="outline"
size="sm"
disabled={isOperating}
onClick={handleTrimStart}
className="text-xs h-7"
>
{t('trimStart')}
</Button>
)}
{selection.startSeconds < 1 && (
<Button
variant="outline"
size="sm"
disabled={isOperating}
onClick={handleFadeIn}
className="text-xs h-7"
title={t('fadeInSelection')}
>
<TrendingUp className="w-3 h-3 mr-1" />
{t('fadeIn')}
</Button>
)}
{selection.endSeconds > currentDuration - 1 && (
<Button
variant="outline"
size="sm"
disabled={isOperating}
onClick={handleTrimEnd}
className="text-xs h-7"
>
{t('trimEnd')}
</Button>
)}
{selection.endSeconds > currentDuration - 1 && (
<Button
variant="outline"
size="sm"
disabled={isOperating}
onClick={handleFadeOut}
className="text-xs h-7"
title={t('fadeOutSelection')}
>
<TrendingDown className="w-3 h-3 mr-1" />
{t('fadeOut')}
</Button>
)}
{/* Trim/Fade are edge actions: enabled only when the selection
touches the very start (start) or very end (end) of the track.
Always rendered (disabled off-edge) so the actions stay
discoverable, with a tooltip explaining how to enable them. */}
<Button
variant="outline"
size="sm"
disabled={isOperating || !atStartEdge}
onClick={handleTrimStart}
className="text-xs h-7"
title={atStartEdge ? t('trimStartSelection') : t('trimStartDisabledHint')}
>
{t('trimStart')}
</Button>
<Button
variant="outline"
size="sm"
disabled={isOperating || !atStartEdge}
onClick={handleFadeIn}
className="text-xs h-7"
title={atStartEdge ? t('fadeInSelection') : t('fadeInDisabledHint')}
>
<TrendingUp className="w-3 h-3 mr-1" />
{t('fadeIn')}
</Button>
<Button
variant="outline"
size="sm"
disabled={isOperating || !atEndEdge}
onClick={handleTrimEnd}
className="text-xs h-7"
title={atEndEdge ? t('trimEndSelection') : t('trimEndDisabledHint')}
>
{t('trimEnd')}
</Button>
<Button
variant="outline"
size="sm"
disabled={isOperating || !atEndEdge}
onClick={handleFadeOut}
className="text-xs h-7"
title={atEndEdge ? t('fadeOutSelection') : t('fadeOutDisabledHint')}
>
<TrendingDown className="w-3 h-3 mr-1" />
{t('fadeOut')}
</Button>
<Button
variant="outline"
size="sm"
@@ -391,6 +391,36 @@ describe("AudioEditor", () => {
})
})
it("renders Trim/Fade buttons disabled for a mid-track selection", async () => {
mockApi.getInputAudioInfo.mockResolvedValue(mockAudioInfo)
render(<AudioEditor job={mockJob} />)
await waitFor(() => {
expect(screen.getByText("Audio Editor")).toBeInTheDocument()
})
const canvas = document.querySelector("canvas") as HTMLCanvasElement
jest.spyOn(canvas, "getBoundingClientRect").mockReturnValue({
left: 0, top: 0, right: 1000, bottom: 140, width: 1000, height: 140, x: 0, y: 0,
toJSON: () => ({}),
} as DOMRect)
// Drag a mid-track region (duration 200, width 1000 → 100px≈20s, 300px≈60s)
fireEvent.mouseDown(canvas, { clientX: 100 })
fireEvent.mouseMove(canvas, { clientX: 300 })
fireEvent.mouseUp(canvas, { clientX: 300 })
// Buttons stay visible (discoverable) but disabled off-edge
const fadeIn = (await screen.findByText("Fade In")).closest("button")
const fadeOut = screen.getByText("Fade Out").closest("button")
const trimStart = screen.getByText("Trim Start").closest("button")
const trimEnd = screen.getByText("Trim End").closest("button")
expect(fadeIn).toBeDisabled()
expect(fadeOut).toBeDisabled()
expect(trimStart).toBeDisabled()
expect(trimEnd).toBeDisabled()
})
it("shows playback controls", async () => {
mockApi.getInputAudioInfo.mockResolvedValue(mockAudioInfo)
render(<AudioEditor job={mockJob} />)
@@ -62,9 +62,6 @@ export default function AutoCorrectModal({
DEFAULT_AUTO_CORRECT_SETTINGS.allow_insertions,
)
const [confidencePreset, setConfidencePreset] = useState<ConfidencePreset>('all')
const [compareModels, setCompareModels] = useState(
DEFAULT_AUTO_CORRECT_SETTINGS.compare_models,
)
const isRunning = status === 'running'
@@ -73,7 +70,9 @@ export default function AutoCorrectModal({
suggest_adlib_removal: adlibRemoval,
allow_insertions: allowInsertions,
min_confidence: PRESET_THRESHOLDS[confidencePreset],
compare_models: compareModels,
// Always multi-model — kept aligned with the backend proactive run so
// the cached result is reused.
compare_models: DEFAULT_AUTO_CORRECT_SETTINGS.compare_models,
})
}
@@ -133,20 +132,6 @@ export default function AutoCorrectModal({
/>
</div>
<div className="flex items-center justify-between gap-4">
<div>
<Label htmlFor="ac-compare">{t('compareLabel')}</Label>
<p className="text-xs text-muted-foreground">
{t('compareHint')}
</p>
</div>
<Switch
id="ac-compare"
checked={compareModels}
onCheckedChange={setCompareModels}
/>
</div>
<div className="flex items-center justify-between gap-4">
<div>
<Label>{t('confidenceLabel')}</Label>
@@ -57,7 +57,6 @@ export default function AutoCorrectPanel({
const {
suggestions,
decisions,
model,
pendingCount,
acceptedCount,
accept,
@@ -85,9 +84,6 @@ export default function AutoCorrectPanel({
accepted: acceptedCount,
})}
</span>
<Badge variant="outline" className="hidden sm:inline-flex text-xs">
{model}
</Badge>
</div>
<div className="flex items-center gap-1 shrink-0">
{!isReadOnly && pendingCount > 0 && (
@@ -151,31 +147,6 @@ export default function AutoCorrectPanel({
>
{t(`category_${s.category}`)}
</Badge>
{s.total_models > 1 && (
<TooltipProvider>
<Tooltip>
<TooltipTrigger asChild>
<Badge
variant="outline"
className={cn(
'shrink-0 text-[10px] tabular-nums',
s.consensus === s.total_models
? 'border-green-500/50 text-green-600 dark:text-green-400'
: 'border-amber-500/50 text-amber-600 dark:text-amber-400',
)}
>
{t('consensusBadge', {
consensus: s.consensus,
total: s.total_models,
})}
</Badge>
</TooltipTrigger>
<TooltipContent className="max-w-xs">
{t('consensusTooltip', { models: s.models.join(', ') })}
</TooltipContent>
</Tooltip>
</TooltipProvider>
)}
{s.conflict_group && (
<TooltipProvider>
<Tooltip>
@@ -227,6 +227,11 @@ export default function LyricsAnalyzer({
updateDataWithHistory,
editLog,
getAuthToken: () => getAccessToken() ?? undefined,
// Auto-run once on load so suggestions are ready without a click. The
// backend pre-generates + caches them during lyrics processing, so this
// is normally an instant cache hit. Skipped in read-only / local mode,
// and only when a jobId exists (the request needs one).
autoRunOnLoad: !isReadOnly && !isLocalMode && Boolean(jobId),
})
// Close the run modal once suggestions arrive (panel takes over)
@@ -6,7 +6,7 @@ import { test, expect, Page } from '@playwright/test'
* Verifies the opt-in AI suggestions flow end-to-end against live production:
* 1. Lists jobs filtered by status=in_review (admin can see all jobs).
* 2. Navigates to the lyrics review page for the first matching job.
* 3. Opens the "AI Suggest" modal and runs suggestion generation.
* 3. Opens the "Auto-correct" modal and runs suggestion generation.
* 4. Waits for the suggestions panel (up to 120s for the LLM call).
* 5. Asserts the panel renders with accept/reject affordances (or the
* explicit "no suggestions" state), then dismisses it WITHOUT
@@ -66,7 +66,7 @@ test.describe('AI auto-correct suggestions (production)', () => {
// exceed 30s (cold Cloud Run instance + uncached correction payload).
// A "Saved Review Sessions" dialog may open on load (it aria-hides the
// rest of the app); close it without restoring before proceeding.
const suggestBtn = page.getByRole('button', { name: /AI Suggest/i })
const suggestBtn = page.getByRole('button', { name: /Auto-correct/i })
const sessionDialog = page.getByRole('dialog', { name: /Saved Review Sessions/i })
await expect(suggestBtn.or(sessionDialog).first()).toBeVisible({ timeout: 90_000 })
if (await sessionDialog.isVisible().catch(() => false)) {
+19
View File
@@ -38,6 +38,9 @@ interface UseAutoCorrectArgs {
updateDataWithHistory: (newData: CorrectionData, desc?: string) => void
editLog: EditLog
getAuthToken: () => string | undefined
/** Auto-trigger one run on load (when references exist) so suggestions are
* ready without a click. Normally a cache hit (backend pre-generates). */
autoRunOnLoad?: boolean
}
export function useAutoCorrect({
@@ -46,11 +49,13 @@ export function useAutoCorrect({
updateDataWithHistory,
editLog,
getAuthToken,
autoRunOnLoad = false,
}: UseAutoCorrectArgs) {
const [status, setStatus] = useState<AutoCorrectStatus>('idle')
const [suggestions, setSuggestions] = useState<AiSuggestion[]>([])
const [decisions, setDecisions] = useState<Record<string, SuggestionDecision>>({})
const [model, setModel] = useState<string>('')
const [cached, setCached] = useState(false)
const [error, setError] = useState<string | null>(null)
const undoInfos = useRef<Record<string, SuggestionUndoInfo>>({})
const abortRef = useRef<AbortController | null>(null)
@@ -91,10 +96,12 @@ export function useAutoCorrect({
)
undoInfos.current = {}
setModel(response.model)
setCached(response.cached)
setStatus('reviewing')
addEditEntry(editLog, 'ai_suggestion_run', {
details: {
model: response.model,
cached: response.cached,
suggestion_count: response.suggestions.length,
elapsed_seconds: response.elapsed_seconds,
settings: response.settings_applied as unknown as Record<string, unknown>,
@@ -120,6 +127,17 @@ export function useAutoCorrect({
abortRef.current?.abort()
}, [])
// Fire exactly one run on load once references + segments are available.
// The ref guard ensures it never re-fires as `data` changes during review.
const autoRanRef = useRef(false)
useEffect(() => {
if (!autoRunOnLoad || autoRanRef.current) return
if (!jobId || status !== 'idle') return
if (!hasReferences || !(data.corrected_segments?.length > 0)) return
autoRanRef.current = true
void run()
}, [autoRunOnLoad, jobId, status, hasReferences, data.corrected_segments, run])
const logDecision = useCallback(
(s: AiSuggestion, op: 'ai_suggestion_accept' | 'ai_suggestion_reject' | 'ai_suggestion_undo') => {
addEditEntry(editLog, op, {
@@ -273,6 +291,7 @@ export function useAutoCorrect({
suggestions,
decisions,
model,
cached,
error,
hasReferences,
pendingCount,
+3
View File
@@ -76,6 +76,9 @@ function resetStore() {
error: null,
isInitialized: false,
})
// The store now mirrors resolved config onto window.__TENANT_CONFIG__ (so lib/api.ts
// can read it synchronously). Clear it between tests to keep them isolated.
delete (window as { __TENANT_CONFIG__?: unknown }).__TENANT_CONFIG__
}
describe("useTenant store", () => {
+42 -2
View File
@@ -55,10 +55,45 @@ function getLocaleFromPath(): string {
return 'en';
}
function getAuthHeaders(): HeadersInit {
const headers: HeadersInit = {
/**
* Resolve the current white-label tenant id, if any.
*
* On tenant portals the Cloudflare Pages edge function (frontend/functions/[[path]].ts)
* injects `window.__TENANT_CONFIG__` into the HTML before any app JS runs, and the
* tenant store (lib/tenant.ts) mirrors the same shape there in dev/preview. Reading it
* directly here keeps api.ts free of an import cycle with tenant.ts (which imports
* API_BASE_URL from this module).
*
* Returns null on the consumer build / consumer domain, so no tenant header is sent and
* existing consumer behavior is unchanged.
*/
export function getTenantId(): string | null {
if (typeof window === 'undefined') return null;
const injected = (window as { __TENANT_CONFIG__?: { tenant?: { id?: string } | null } }).__TENANT_CONFIG__;
const id = injected?.tenant?.id;
return typeof id === 'string' && id ? id : null;
}
/**
* Base headers attached to every API request: locale, and the X-Tenant-ID header when
* on a white-label tenant portal. The shared backend (api.nomadkaraoke.com) cannot infer
* the tenant from the Host (it's not the tenant subdomain) or from the prod-disabled
* `?tenant=` query param, so this header is the primary tenant-detection signal that lets
* the backend apply tenant config (locked theme, Dropbox path, no YouTube/GDrive).
*/
function getBaseHeaders(): Record<string, string> {
const headers: Record<string, string> = {
'Accept-Language': getLocaleFromPath(),
};
const tenantId = getTenantId();
if (tenantId) {
headers['X-Tenant-ID'] = tenantId;
}
return headers;
}
function getAuthHeaders(): HeadersInit {
const headers: Record<string, string> = getBaseHeaders();
const token = getAccessToken();
if (token) {
headers['Authorization'] = `Bearer ${token}`;
@@ -1285,6 +1320,11 @@ export const api = {
method: 'POST',
headers: {
'Content-Type': 'application/json',
// Carry tenant context so the backend validates the email domain against the
// tenant, embeds tenant_id in the magic-link token, and uses the tenant's
// sender email + portal URL. Without this, tenant sign-in silently falls back
// to the consumer (nomad) flow.
...getBaseHeaders(),
},
body: JSON.stringify(body),
});
+7 -1
View File
@@ -35,7 +35,10 @@ export const DEFAULT_AUTO_CORRECT_SETTINGS: AutoCorrectSettings = {
suggest_adlib_removal: true,
allow_insertions: true,
min_confidence: 0,
compare_models: false,
// Always multi-model. Kept in sync with the backend proactive run
// (AutoCorrectSettings(compare_models=True)) so the on-load request is a
// cache hit. Not user-configurable.
compare_models: true,
}
export interface AiSuggestion {
@@ -64,6 +67,8 @@ export interface AutoCorrectResponse {
elapsed_seconds: number
settings_applied: AutoCorrectSettings
warnings: string[]
/** Served from the per-job cache — no AI cost was incurred. */
cached: boolean
}
export class AutoCorrectApiError extends Error {
@@ -138,5 +143,6 @@ export async function fetchAutoCorrectSuggestions(
elapsed_seconds: data.elapsed_seconds,
settings_applied: data.settings_applied,
warnings: data.warnings ?? [],
cached: data.cached ?? false,
}
}
+19
View File
@@ -238,6 +238,11 @@ const useTenantStore = create<TenantStore>()((set, get) => ({
isInitialized: true,
})
// Mirror to the edge-config global so synchronous, import-cycle-free consumers
// (e.g. getTenantId() in lib/api.ts) can read the tenant in dev/preview where the
// Cloudflare edge function does not inject __TENANT_CONFIG__.
mirrorTenantConfigToWindow(data)
// Apply tenant branding to CSS variables
if (data.tenant) {
applyTenantBranding(data.tenant.branding)
@@ -256,6 +261,7 @@ const useTenantStore = create<TenantStore>()((set, get) => ({
setTenant: (tenant, isDefault) => {
set({ tenant, isDefault, isInitialized: true })
mirrorTenantConfigToWindow({ tenant, is_default: isDefault })
if (tenant) {
applyTenantBranding(tenant.branding)
}
@@ -348,6 +354,19 @@ function applyTenantBranding(branding: TenantBranding) {
}
}
/**
* Mirror the resolved tenant config onto `window.__TENANT_CONFIG__`.
*
* The Cloudflare edge function injects this global on tenant subdomains in production,
* but not in local dev or admin preview (where the tenant is resolved by fetch or
* setTenant). Mirroring it here gives lib/api.ts a single synchronous, import-cycle-free
* source of truth for attaching the X-Tenant-ID header in every environment.
*/
function mirrorTenantConfigToWindow(data: TenantConfigResponse) {
if (typeof window === "undefined") return
;(window as { __TENANT_CONFIG__?: TenantConfigResponse }).__TENANT_CONFIG__ = data
}
/**
* Hook to get tenant-aware API headers.
* Use this when making API calls that need tenant context.
+19 -11
View File
@@ -780,7 +780,13 @@
"fadeIn": "ظهور تدريجي",
"fadeInSelection": "ظهور تدريجي في المنطقة المحددة",
"fadeOut": "تلاشي تدريجي",
"fadeOutSelection": "تلاشي تدريجي في المنطقة المحددة"
"fadeOutSelection": "تلاشي تدريجي في المنطقة المحددة",
"fadeInDisabledHint": "لإضافة تأثير الظهور التدريجي، حدد منطقة تبدأ من بداية المسار تماماً",
"fadeOutDisabledHint": "لإضافة تأثير التلاشي التدريجي، حدد منطقة تنتهي عند نهاية المسار تماماً",
"trimEndDisabledHint": "لقص النهاية، حدد منطقة تنتهي عند نهاية المسار تماماً",
"trimEndSelection": "إزالة كل شيء بعد التحديد",
"trimStartDisabledHint": "لقص البداية، حدد منطقة تبدأ من بداية المسار تماماً",
"trimStartSelection": "إزالة كل شيء قبل التحديد"
},
"audioEditRestore": {
"title": "جلسات تعديل الصوت المحفوظة",
@@ -807,7 +813,7 @@
"acceptAll": "قبول الكل",
"revertAll": "تراجع عن الكل",
"undoAll": "تراجع عن الكل",
"resetAllChanges": "إعادة تعيين جميع التغييرات إلى الكلمات الأصلية المصححة بالذكاء الاصطناعي",
"resetAllChanges": "إعادة تعيين جميع التغييرات والعودة إلى الكلمات المصححة الأصلية",
"undo": "تراجع",
"redo": "إعادة",
"findReplace": "بحث/استبدال",
@@ -821,8 +827,8 @@
"audioLoadError": "تعذر تحميل الصوت",
"audioStillLoading": "لا يزال الصوت قيد التحميل...",
"loadingAudio": "جاري تحميل الصوت...",
"autoCorrect": "اقتراحات الذكاء الاصطناعي",
"autoCorrectDesc": "احصل على اقتراحات للتصحيح بالذكاء الاصطناعي من خلال مقارنة النص المنسوخ مع الكلمات المرجعية. لن يتم تغيير أي شيء حتى توافق على كل اقتراح."
"autoCorrect": "التصحيح التلقائي",
"autoCorrectDesc": "إنشاء اقتراحات تصحيح من خلال مقارنة التفريغ الصوتي مع الكلمات المرجعية. لن يتم تغيير أي شيء حتى توافق على كل اقتراح."
},
"guidance": {
"showTips": "إظهار النصائح",
@@ -1294,18 +1300,18 @@
"category_other": "أخرى",
"category_repeated_chorus_fix": "كورس",
"collapse": "طي الاقتراحات",
"confidenceHint": "مدى ثقة الذكاء الاصطناعي المطلوبة لعرض الاقتراح",
"confidenceHint": "مستوى الثقة المطلوب للاقتراح قبل ظهوره",
"confidenceLabel": "تصفية الاقتراحات",
"confidence_all": "عرض الكل",
"confidence_high": "ثقة عالية",
"description": "يقارن الذكاء الاصطناعي الكلمات المنسوخة مع المصادر المرجعية ويقترح تعديلات على مستوى الكلمة. يمكنك مراجعة كل اقتراح — ولن يتم تطبيق أي تغيير حتى توافق عليه.",
"description": "يقارن التصحيح التلقائي التفريغ الصوتي بالمصادر المرجعية ويقترح تعديلات على مستوى الكلمة. يمكنك مراجعة كل اقتراح — ولن يتم تطبيق أي شيء حتى توافق عليه.",
"dismiss": "تجاهل الاقتراحات",
"expand": "توسيع الاقتراحات",
"insertMarker": "إدراج:",
"insertionsHint": "السماح بالاقتراحات التي تدرج الكلمات المفقودة في النسخ",
"insertionsLabel": "اقتراح الكلمات المفقودة",
"noReferences": "لا تتوفر كلمات مرجعية لهذه الأغنية، لذا لا يمكن إنشاء اقتراحات الذكاء الاصطناعي. أضف الكلمات من اللوحة المرجعية أولاً.",
"noSuggestions": "لم يتم العثور على أي مشاكل — لا توجد تغييرات مقترحة من الذكاء الاصطناعي.",
"noReferences": "لا تتوفر كلمات مرجعية لهذه الأغنية، لذا لا يمكن إنشاء اقتراحات. أضف الكلمات من اللوحة المرجعية أولاً.",
"noSuggestions": "لم يتم العثور على أي مشاكل — لا توجد تغييرات مقترحة.",
"reject": "رفض الاقتراح",
"rejectAll": "رفض الكل",
"rejected": "مرفوض",
@@ -1313,7 +1319,7 @@
"running": "جاري تحليل الكلمات... يستغرق هذا عادةً بين 15 و 60 ثانية.",
"staleHint": "تم تعديل هذه الكلمات بعد إنشاء الاقتراحات، لذا لم يعد هذا الاقتراح صالحاً.",
"summary": "{total} اقتراحات · {pending} قيد الانتظار · {accepted} مقبولة",
"title": "اقتراحات التصحيح بالذكاء الاصطناعي",
"title": "اقتراحات التصحيح التلقائي",
"undo": "التراجع عن هذا الاقتراح",
"cancel": "إلغاء",
"close": "إغلاق",
@@ -1321,9 +1327,11 @@
"compareHint": "أبطأ وأعلى تكلفة، لكنه يوضح الاقتراحات التي تتفق عليها عدة نماذج",
"compareLabel": "مقارنة عدة نماذج للذكاء الاصطناعي",
"conflictBadge": "بديل",
"conflictTooltip": "تختلف النماذج حول هذه الكلمات — قبول أحد البدائل يعني رفض الأخرى.",
"conflictTooltip": "توجد اقتراحات مختلفة لهذه الكلمات — قبول أحد الخيارات يؤدي إلى رفض الخيارات الأخرى.",
"consensusBadge": "{consensus}/{total} من النماذج",
"consensusTooltip": "مقترح من: {models}"
"consensusTooltip": "مقترح من: {models}",
"cachedBadge": "مخزن مؤقتاً",
"cachedTooltip": "تمت الاستعادة من معالجة سابقة لنفس الكلمات — لم يتم احتساب أي تكلفة للذكاء الاصطناعي."
}
},
"instrumentalReview": {
+19 -11
View File
@@ -780,7 +780,13 @@
"fadeIn": "Fosa d'entrada",
"fadeInSelection": "Aplica una fosa d'entrada a la regió seleccionada",
"fadeOut": "Fosa de sortida",
"fadeOutSelection": "Aplica una fosa de sortida a la regió seleccionada"
"fadeOutSelection": "Aplica una fosa de sortida a la regió seleccionada",
"fadeInDisabledHint": "Per fer una fosa d'entrada, selecciona una regió que comenci just al principi de la pista",
"fadeOutDisabledHint": "Per fer una fosa de sortida, selecciona una regió que acabi just al final de la pista",
"trimEndDisabledHint": "Per retallar el final, selecciona una regió que acabi just al final de la pista",
"trimEndSelection": "Elimina tot el que hi ha després de la selecció",
"trimStartDisabledHint": "Per retallar el principi, selecciona una regió que comenci just al principi de la pista",
"trimStartSelection": "Elimina tot el que hi ha abans de la selecció"
},
"audioEditRestore": {
"title": "Sessions d'edició d'àudio desades",
@@ -807,7 +813,7 @@
"acceptAll": "Accepta-ho tot",
"revertAll": "Reverteix-ho tot",
"undoAll": "Desfés-ho tot",
"resetAllChanges": "Restableix tots els canvis a les lletres originals corregides per IA",
"resetAllChanges": "Restableix tots els canvis a la lletra corregida original",
"undo": "Desfés",
"redo": "Refés",
"findReplace": "Cerca/Reemplaça",
@@ -821,8 +827,8 @@
"audioLoadError": "No s'ha pogut carregar l'àudio",
"audioStillLoading": "L'àudio encara s'està carregant...",
"loadingAudio": "Carregant l'àudio...",
"autoCorrect": "Suggeriments de la IA",
"autoCorrectDesc": "Genera suggeriments de correcció de la IA comparant la transcripció amb la lletra de referència. No es canvia res fins que acceptis cada suggeriment."
"autoCorrect": "Autocorrecció",
"autoCorrectDesc": "Genera suggeriments de correcció comparant la transcripció amb la lletra de referència. No es canvia res fins que acceptes cada suggeriment."
},
"guidance": {
"showTips": "Mostra els consells",
@@ -1294,18 +1300,18 @@
"category_other": "altres",
"category_repeated_chorus_fix": "tornada",
"collapse": "Contreu els suggeriments",
"confidenceHint": "Quin grau de certesa ha de tenir la IA per mostrar un suggeriment",
"confidenceHint": "Quin nivell de confiança ha de tenir un suggeriment abans de mostrar-se",
"confidenceLabel": "Filtre de suggeriments",
"confidence_all": "Mostra-ho tot",
"confidence_high": "Certesa alta",
"description": "La IA compara la lletra transcrita amb les fonts de referència i suggereix correccions paraula per paraula. Tu revises cada suggeriment — no s'aplica res fins que ho acceptes.",
"description": "L'autocorrecció compara la lletra transcrita amb les fonts de referència i suggereix correccions a nivell de paraula. Tu revises cada suggeriment — no s'aplica res fins que ho acceptes.",
"dismiss": "Descarta els suggeriments",
"expand": "Desplega els suggeriments",
"insertMarker": "insereix:",
"insertionsHint": "Permet suggeriments que insereixin paraules que la transcripció ha omès",
"insertionsLabel": "Suggereix paraules que falten",
"noReferences": "No hi ha cap lletra de referència disponible per a aquesta cançó, per la qual cosa no es poden generar suggeriments de la IA. Primer, afegeix la lletra des del tauler de referència.",
"noSuggestions": "No s'ha trobat cap problema — la IA no suggereix cap canvi.",
"noReferences": "No hi ha cap lletra de referència disponible per a aquesta cançó, així que no es poden generar suggeriments. Afegeix primer la lletra des del panell de referència.",
"noSuggestions": "No s'han trobat problemes — no hi ha cap canvi suggerit.",
"reject": "Rebutja el suggeriment",
"rejectAll": "Rebutja-ho tot",
"rejected": "Rebutjat",
@@ -1313,7 +1319,7 @@
"running": "S'està analitzant la lletra... això sol trigar entre 15 i 60 segons.",
"staleHint": "Aquestes paraules s'han editat des que es van generar els suggeriments, per la qual cosa aquest suggeriment ja no és vàlid.",
"summary": "{total} suggeriments · {pending} pendents · {accepted} acceptats",
"title": "Suggeriments de correcció de la IA",
"title": "Suggeriments d'autocorrecció",
"undo": "Desfés aquest suggeriment",
"cancel": "Cancel·la",
"close": "Tanca",
@@ -1321,9 +1327,11 @@
"compareHint": "Més lent i més car, però mostra en quins suggeriments coincideixen diversos models",
"compareLabel": "Compara diversos models d'IA",
"conflictBadge": "variant",
"conflictTooltip": "Els models no coincideixen en aquestes paraules — si acceptes una variant, rebutges les altres.",
"conflictTooltip": "Hi ha diferents suggeriments per a aquestes paraules — si acceptes una variant, es rebutgen les altres.",
"consensusBadge": "{consensus}/{total} models",
"consensusTooltip": "Proposat per: {models}"
"consensusTooltip": "Proposat per: {models}",
"cachedBadge": "en memòria cau",
"cachedTooltip": "Restaurat a partir d'una execució anterior amb la mateixa lletra — no s'ha generat cap cost d'IA."
}
},
"instrumentalReview": {
+19 -11
View File
@@ -780,7 +780,13 @@
"fadeIn": "Postupné zesílení",
"fadeInSelection": "Postupné zesílení vybraného úseku",
"fadeOut": "Postupné zeslabení",
"fadeOutSelection": "Postupné zeslabení vybraného úseku"
"fadeOutSelection": "Postupné zeslabení vybraného úseku",
"fadeInDisabledHint": "Pro postupné zesílení vyber úsek, který začíná na úplném začátku stopy",
"fadeOutDisabledHint": "Pro postupné zeslabení vyber úsek, který končí na úplném konci stopy",
"trimEndDisabledHint": "Pro oříznutí konce vyber úsek, který končí na úplném konci stopy",
"trimEndSelection": "Odstranit vše za výběrem",
"trimStartDisabledHint": "Pro oříznutí začátku vyber úsek, který začíná na úplném začátku stopy",
"trimStartSelection": "Odstranit vše před výběrem"
},
"audioEditRestore": {
"title": "Uložené relace úprav zvuku",
@@ -807,7 +813,7 @@
"acceptAll": "Přijmout vše",
"revertAll": "Vrátit vše",
"undoAll": "Vrátit vše zpět",
"resetAllChanges": "Resetovat všechny změny zpět na původní text opravený AI",
"resetAllChanges": "Vrátit všechny změny zpět na původní opravený text",
"undo": "Zpět",
"redo": "Znovu",
"findReplace": "Najít/Nahradit",
@@ -821,8 +827,8 @@
"audioLoadError": "Nepodařilo se načíst audio",
"audioStillLoading": "Audio se stále načítá...",
"loadingAudio": "Načítání audia...",
"autoCorrect": "Návrhy AI",
"autoCorrectDesc": "Nech AI vygenerovat návrhy oprav porovnáním přepisu s referenčním textem. Nic se nezmění, dokud jednotlivé návrhy nepřijmeš."
"autoCorrect": "Automatická oprava",
"autoCorrectDesc": "Vygenerovat návrhy oprav porovnáním přepisu s referenčním textem. Nic se nezmění, dokud každý návrh nepřijmeš."
},
"guidance": {
"showTips": "Zobrazit tipy",
@@ -1294,18 +1300,18 @@
"category_other": "ostatní",
"category_repeated_chorus_fix": "refrén",
"collapse": "Sbalit návrhy",
"confidenceHint": "Jak moc si musí být AI jistá, aby zobrazila návrh",
"confidenceHint": "Jak vysoká musí být jistota návrhu, než se zobrazí",
"confidenceLabel": "Filtr návrhů",
"confidence_all": "Zobrazit vše",
"confidence_high": "Vysoká jistota",
"description": "AI porovná přepsaný text s referenčními zdroji a navrhne opravy jednotlivých slov. Každý návrh si můžeš zkontrolovat — nic se nezmění, dokud ho nepřijmeš.",
"description": "Automatická oprava porovnává přepsaný text s referenčními zdroji a navrhuje opravy na úrovni slov. Každý návrh si zkontroluješ — nic se neaplikuje, dokud ho nepřijmeš.",
"dismiss": "Skrýt návrhy",
"expand": "Rozbalit návrhy",
"insertMarker": "vložit:",
"insertionsHint": "Povolit návrhy, které vkládají slova, která v přepisu chybí",
"insertionsLabel": "Navrhnout chybějící slova",
"noReferences": "Pro tuto píseň nejsou k dispozici žádné referenční texty, takže nelze vygenerovat návrhy AI. Nejprve přidej text z referenčního panelu.",
"noSuggestions": "Nebyly nalezeny žádné problémy — AI nemá žádné návrhy na změnu.",
"noReferences": "Pro tuto píseň nejsou k dispozici žádné referenční texty, takže nelze vygenerovat návrhy. Nejprve přidej text z referenčního panelu.",
"noSuggestions": "Nebyly nalezeny žádné problémy — nejsou navrženy žádné změny.",
"reject": "Odmítnout návrh",
"rejectAll": "Odmítnout vše",
"rejected": "Odmítnuto",
@@ -1313,7 +1319,7 @@
"running": "Analyzuji text… obvykle to trvá 15–60 sekund.",
"staleHint": "Tato slova byla upravena od chvíle, kdy byly návrhy vygenerovány, takže tento návrh již neplatí.",
"summary": "{total} návrhů · {pending} čeká · {accepted} přijato",
"title": "Návrhy oprav AI",
"title": "Návrhy automatické opravy",
"undo": "Vzít tento návrh zpět",
"cancel": "Zrušit",
"close": "Zavřít",
@@ -1321,9 +1327,11 @@
"compareHint": "Pomalejší a dražší, ale ukáže, na kterých návrzích se shodne více modelů",
"compareLabel": "Porovnat více AI modelů",
"conflictBadge": "varianta",
"conflictTooltip": "Modely se na těchto slovech neshodují — přijetím jedné varianty odmítneš ostatní.",
"conflictTooltip": "Pro tato slova existují různé návrhy — přijetím jedné varianty odmítneš ostatní.",
"consensusBadge": "{consensus}/{total} modelů",
"consensusTooltip": "Navrženo: {models}"
"consensusTooltip": "Navrženo: {models}",
"cachedBadge": "z mezipaměti",
"cachedTooltip": "Obnoveno z předchozího zpracování stejného textu — nevznikly žádné náklady na AI."
}
},
"instrumentalReview": {
+19 -11
View File
@@ -780,7 +780,13 @@
"fadeIn": "Fade ind",
"fadeInSelection": "Fade ind over det valgte område",
"fadeOut": "Fade ud",
"fadeOutSelection": "Fade ud over det valgte område"
"fadeOutSelection": "Fade ud over det valgte område",
"fadeInDisabledHint": "For at fade ind skal du vælge et område, der begynder helt i starten af sporet",
"fadeOutDisabledHint": "For at fade ud skal du vælge et område, der slutter helt for enden af sporet",
"trimEndDisabledHint": "For at beskære slutningen skal du vælge et område, der slutter helt for enden af sporet",
"trimEndSelection": "Fjern alt efter markeringen",
"trimStartDisabledHint": "For at beskære starten skal du vælge et område, der begynder helt i starten af sporet",
"trimStartSelection": "Fjern alt før markeringen"
},
"audioEditRestore": {
"title": "Gemte lydredigeringssessioner",
@@ -807,7 +813,7 @@
"acceptAll": "Accepter alle",
"revertAll": "Gendan alle",
"undoAll": "Fortryd alle",
"resetAllChanges": "Nulstil alle ændringer tilbage til de originale AI-rettede sangtekster",
"resetAllChanges": "Nulstil alle ændringer tilbage til den oprindelige rettede sangtekst",
"undo": "Fortryd",
"redo": "Gendan",
"findReplace": "Find/Erstat",
@@ -821,8 +827,8 @@
"audioLoadError": "Kunne ikke indlæse lyd",
"audioStillLoading": "Lyden indlæses stadig...",
"loadingAudio": "Indlæser lyd...",
"autoCorrect": "AI-forslag",
"autoCorrectDesc": "Generer AI-rettelsesforslag ved at sammenligne transskriptionen med referenceteksten. Intet ændres, før du accepterer hvert forslag."
"autoCorrect": "Autokorrektur",
"autoCorrectDesc": "Generer forslag til rettelser ved at sammenligne transskriptionen med referenceteksten. Intet ændres, før du accepterer hvert forslag."
},
"guidance": {
"showTips": "Vis tips",
@@ -1294,18 +1300,18 @@
"category_other": "andet",
"category_repeated_chorus_fix": "omkvæd",
"collapse": "Skjul forslag",
"confidenceHint": "Hvor sikker AI'en skal være for at vise et forslag",
"confidenceHint": "Hvor sikkert et forslag skal være, før det vises",
"confidenceLabel": "Forslagsfilter",
"confidence_all": "Vis alle",
"confidence_high": "Høj sikkerhed",
"description": "AI'en sammenligner den transskriberede tekst med referencekilderne og foreslår rettelser på ordniveau. Du gennemgår hvert forslag — intet ændres, før du accepterer det.",
"description": "Autokorrektur sammenligner den transskriberede sangtekst med referencekilderne og foreslår rettelser på ordniveau. Du gennemgår hvert forslag — intet anvendes, før du accepterer det.",
"dismiss": "Fjern forslag",
"expand": "Udvid forslag",
"insertMarker": "indsæt:",
"insertionsHint": "Tillad forslag, der indsætter ord, som transskriptionen overså",
"insertionsLabel": "Foreslå manglende ord",
"noReferences": "Der er ingen referencetekster tilgængelige for denne sang, så der kan ikke genereres AI-forslag. Tilføj tekster fra referencepanelet først.",
"noSuggestions": "Ingen problemer fundet — AI'en har ingen foreslåede ændringer.",
"noReferences": "Der er ingen referencetekster tilgængelige for denne sang, så der kan ikke genereres forslag. Tilføj en sangtekst fra referencepanelet først.",
"noSuggestions": "Ingen problemer fundet — der er ingen foreslåede ændringer.",
"reject": "Afvis forslag",
"rejectAll": "Afvis alle",
"rejected": "Afvist",
@@ -1313,7 +1319,7 @@
"running": "Analyserer tekst… dette tager normalt 15–60 sekunder.",
"staleHint": "Disse ord er blevet redigeret, siden forslagene blev genereret, så dette forslag gælder ikke længere.",
"summary": "{total} forslag · {pending} afventer · {accepted} accepteret",
"title": "AI-rettelsesforslag",
"title": "Forslag til autokorrektur",
"undo": "Fortryd dette forslag",
"cancel": "Annuller",
"close": "Luk",
@@ -1321,9 +1327,11 @@
"compareHint": "Langsommere og koster mere, men viser, hvilke forslag flere modeller er enige om",
"compareLabel": "Sammenlign flere AI-modeller",
"conflictBadge": "variant",
"conflictTooltip": "Modellerne er uenige om disse ord — hvis du accepterer én variant, afvises de andre.",
"conflictTooltip": "Der er forskellige forslag til disse ord — hvis du accepterer én variant, afvises de andre.",
"consensusBadge": "{consensus}/{total} modeller",
"consensusTooltip": "Foreslået af: {models}"
"consensusTooltip": "Foreslået af: {models}",
"cachedBadge": "cachet",
"cachedTooltip": "Gendannet fra en tidligere kørsel med de samme sangtekster — der påløb ingen AI-omkostninger."
}
},
"instrumentalReview": {
+19 -11
View File
@@ -780,7 +780,13 @@
"fadeIn": "Einblenden",
"fadeInSelection": "Über den ausgewählten Bereich einblenden",
"fadeOut": "Ausblenden",
"fadeOutSelection": "Über den ausgewählten Bereich ausblenden"
"fadeOutSelection": "Über den ausgewählten Bereich ausblenden",
"fadeInDisabledHint": "Um einzublenden, wähle einen Bereich, der ganz am Anfang des Tracks beginnt",
"fadeOutDisabledHint": "Um auszublenden, wähle einen Bereich, der ganz am Ende des Tracks endet",
"trimEndDisabledHint": "Um das Ende abzuschneiden, wähle einen Bereich, der ganz am Ende des Tracks endet",
"trimEndSelection": "Alles nach der Auswahl entfernen",
"trimStartDisabledHint": "Um den Anfang abzuschneiden, wähle einen Bereich, der ganz am Anfang des Tracks beginnt",
"trimStartSelection": "Alles vor der Auswahl entfernen"
},
"audioEditRestore": {
"title": "Gespeicherte Audiobearbeitungs-Sitzungen",
@@ -807,7 +813,7 @@
"acceptAll": "Alle akzeptieren",
"revertAll": "Alle verwerfen",
"undoAll": "Alle rückgängig machen",
"resetAllChanges": "Alle Änderungen auf den ursprünglichen KI-korrigierten Text zurücksetzen",
"resetAllChanges": "Alle Änderungen auf den ursprünglich korrigierten Text zurücksetzen",
"undo": "Rückgängig",
"redo": "Wiederholen",
"findReplace": "Suchen/Ersetzen",
@@ -821,8 +827,8 @@
"audioLoadError": "Audio konnte nicht geladen werden",
"audioStillLoading": "Audio wird noch geladen...",
"loadingAudio": "Audio wird geladen...",
"autoCorrect": "KI-Vorschläge",
"autoCorrectDesc": "Generiere KI-Korrekturvorschläge durch den Vergleich der Transkription mit dem Referenztext. Nichts wird geändert, bis du jeden Vorschlag akzeptierst."
"autoCorrect": "Autokorrektur",
"autoCorrectDesc": "Generiere Korrekturvorschläge, indem du die Transkription mit dem Referenztext vergleichst. Nichts wird geändert, bis du jeden Vorschlag akzeptierst."
},
"guidance": {
"showTips": "Tipps anzeigen",
@@ -1294,18 +1300,18 @@
"category_other": "Sonstiges",
"category_repeated_chorus_fix": "Refrain",
"collapse": "Vorschläge einklappen",
"confidenceHint": "Wie sicher die KI sein muss, um einen Vorschlag anzuzeigen",
"confidenceHint": "Wie sicher ein Vorschlag sein muss, bevor er angezeigt wird",
"confidenceLabel": "Vorschlagsfilter",
"confidence_all": "Alle anzeigen",
"confidence_high": "Hohe Sicherheit",
"description": "Die KI vergleicht den transkribierten Text mit den Referenzquellen und schlägt Korrekturen auf Wortebene vor. Du überprüfst jeden Vorschlag — nichts wird angewendet, bis du ihn akzeptierst.",
"description": "Die Autokorrektur vergleicht den transkribierten Text mit den Referenzquellen und schlägt Korrekturen auf Wortebene vor. Du überprüfst jeden Vorschlag — nichts wird angewendet, bis du ihn akzeptierst.",
"dismiss": "Vorschläge verwerfen",
"expand": "Vorschläge ausklappen",
"insertMarker": "einfügen:",
"insertionsHint": "Erlaube Vorschläge, die Wörter einfügen, die bei der Transkription übersehen wurden",
"insertionsLabel": "Fehlende Wörter vorschlagen",
"noReferences": "Für diesen Song ist kein Referenztext verfügbar, daher können keine KI-Vorschläge generiert werden. Füge zuerst Text aus dem Referenz-Panel hinzu.",
"noSuggestions": "Keine Probleme gefunden — die KI hat keine Änderungsvorschläge.",
"noReferences": "Für diesen Song ist kein Referenztext verfügbar, daher können keine Vorschläge generiert werden. Füge zuerst einen Text über das Referenz-Panel hinzu.",
"noSuggestions": "Keine Probleme gefunden — es gibt keine Änderungsvorschläge.",
"reject": "Vorschlag ablehnen",
"rejectAll": "Alle ablehnen",
"rejected": "Abgelehnt",
@@ -1313,7 +1319,7 @@
"running": "Text wird analysiert… dies dauert normalerweise 15–60 Sekunden.",
"staleHint": "Diese Wörter wurden bearbeitet, seit die Vorschläge generiert wurden, daher gilt dieser Vorschlag nicht mehr.",
"summary": "{total} Vorschläge · {pending} ausstehend · {accepted} akzeptiert",
"title": "KI-Korrekturvorschläge",
"title": "Autokorrektur-Vorschläge",
"undo": "Diesen Vorschlag rückgängig machen",
"cancel": "Abbrechen",
"close": "Schließen",
@@ -1321,9 +1327,11 @@
"compareHint": "Langsamer und teurer, zeigt aber, bei welchen Vorschlägen mehrere Modelle übereinstimmen",
"compareLabel": "Mehrere KI-Modelle vergleichen",
"conflictBadge": "Variante",
"conflictTooltip": "Die Modelle sind sich bei diesen Wörtern uneinig — wenn du eine Variante akzeptierst, werden die anderen abgelehnt.",
"conflictTooltip": "Es gibt verschiedene Vorschläge für diese Wörter — wenn du eine Variante akzeptierst, werden die anderen abgelehnt.",
"consensusBadge": "{consensus}/{total} Modelle",
"consensusTooltip": "Vorgeschlagen von: {models}"
"consensusTooltip": "Vorgeschlagen von: {models}",
"cachedBadge": "zwischengespeichert",
"cachedTooltip": "Wiederhergestellt aus einem vorherigen Durchlauf mit demselben Text — es sind keine KI-Kosten angefallen."
}
},
"instrumentalReview": {
+19 -11
View File
@@ -780,7 +780,13 @@
"fadeIn": "Fade In",
"fadeInSelection": "Εφάρμοσε fade in στην επιλεγμένη περιοχή",
"fadeOut": "Fade Out",
"fadeOutSelection": "Εφάρμοσε fade out στην επιλεγμένη περιοχή"
"fadeOutSelection": "Εφάρμοσε fade out στην επιλεγμένη περιοχή",
"fadeInDisabledHint": "Για fade in, επίλεξε μια περιοχή που ξεκινά ακριβώς στην αρχή του κομματιού",
"fadeOutDisabledHint": "Για fade out, επίλεξε μια περιοχή που τελειώνει ακριβώς στο τέλος του κομματιού",
"trimEndDisabledHint": "Για να περικόψεις το τέλος, επίλεξε μια περιοχή που τελειώνει ακριβώς στο τέλος του κομματιού",
"trimEndSelection": "Αφαίρεσε τα πάντα μετά την επιλογή",
"trimStartDisabledHint": "Για να περικόψεις την αρχή, επίλεξε μια περιοχή που ξεκινά ακριβώς στην αρχή του κομματιού",
"trimStartSelection": "Αφαίρεσε τα πάντα πριν από την επιλογή"
},
"audioEditRestore": {
"title": "Αποθηκευμένες Συνεδρίες Επεξεργασίας Ήχου",
@@ -807,7 +813,7 @@
"acceptAll": "Αποδοχή Όλων",
"revertAll": "Επαναφορά Όλων",
"undoAll": "Αναίρεση Όλων",
"resetAllChanges": "Επαναφορά όλων των αλλαγών πίσω στους αρχικούς στίχους που διορθώθηκαν από το AI",
"resetAllChanges": "Επαναφορά όλων των αλλαγών στους αρχικούς διορθωμένους στίχους",
"undo": "Αναίρεση",
"redo": "Επανάληψη",
"findReplace": "Εύρεση/Αντικατάσταση",
@@ -821,8 +827,8 @@
"audioLoadError": "Δεν ήταν δυνατή η φόρτωση του ήχου",
"audioStillLoading": "Ο ήχος φορτώνει ακόμα...",
"loadingAudio": "Φόρτωση ήχου...",
"autoCorrect": "Προτάσεις AI",
"autoCorrectDesc": "Δημιούργησε προτάσεις διόρθωσης AI συγκρίνοντας τη μεταγραφή με τους στίχους αναφοράς. Τίποτα δεν αλλάζει μέχρι να αποδεχτείς κάθε πρόταση."
"autoCorrect": "Αυτόματη διόρθωση",
"autoCorrectDesc": "Δημιούργησε προτάσεις διόρθωσης συγκρίνοντας τη μεταγραφή με τους στίχους αναφοράς. Τίποτα δεν αλλάζει μέχρι να αποδεχτείς κάθε πρόταση."
},
"guidance": {
"showTips": "Εμφάνιση συμβουλών",
@@ -1294,18 +1300,18 @@
"category_other": "άλλο",
"category_repeated_chorus_fix": "ρεφρέν",
"collapse": "Σύμπτυξη προτάσεων",
"confidenceHint": "Πόσο σίγουρο πρέπει να είναι το AI για να εμφανίσει μια πρόταση",
"confidenceHint": "Πόσο βέβαιη πρέπει να είναι μια πρόταση πριν εμφανιστεί",
"confidenceLabel": "Φίλτρο προτάσεων",
"confidence_all": "Εμφάνιση όλων",
"confidence_high": "Υψηλή βεβαιότητα",
"description": "Το AI συγκρίνει τους μεταγραμμένους στίχους με τις πηγές αναφοράς και προτείνει διορθώσεις σε επίπεδο λέξης. Εσύ ελέγχεις κάθε πρόταση — τίποτα δεν εφαρμόζεται μέχρι να το αποδεχτείς.",
"description": "Η αυτόματη διόρθωση συγκρίνει τους μεταγραμμένους στίχους με τις πηγές αναφοράς και προτείνει διορθώσεις σε επίπεδο λέξης. Ελέγχεις κάθε πρόταση — τίποτα δεν εφαρμόζεται μέχρι να την αποδεχτείς.",
"dismiss": "Αγνόηση προτάσεων",
"expand": "Ανάπτυξη προτάσεων",
"insertMarker": "εισαγωγή:",
"insertionsHint": "Επίτρεψε προτάσεις που εισάγουν λέξεις που παραλείφθηκαν κατά τη μεταγραφή",
"insertionsLabel": "Πρόταση λέξεων που λείπουν",
"noReferences": "Δεν υπάρχουν διαθέσιμοι στίχοι αναφοράς για αυτό το τραγούδι, επομένως δεν μπορούν να δημιουργηθούν προτάσεις AI. Πρόσθεσε στίχους από το πάνελ αναφοράς πρώτα.",
"noSuggestions": "Δεν βρέθηκαν προβλήματα — το AI δεν έχει προτεινόμενες αλλαγές.",
"noReferences": "Δεν υπάρχουν διαθέσιμοι στίχοι αναφοράς για αυτό το τραγούδι, επομένως δεν μπορούν να δημιουργηθούν προτάσεις. Πρόσθεσε πρώτα στίχους από τον πίνακα αναφοράς.",
"noSuggestions": "Δεν βρέθηκαν προβλήματα — δεν υπάρχουν προτεινόμενες αλλαγές.",
"reject": "Απόρριψη πρότασης",
"rejectAll": "Απόρριψη όλων",
"rejected": "Απορρίφθηκε",
@@ -1313,7 +1319,7 @@
"running": "Ανάλυση στίχων… αυτό συνήθως διαρκεί 15–60 δευτερόλεπτα.",
"staleHint": "Αυτές οι λέξεις επεξεργάστηκαν μετά τη δημιουργία των προτάσεων, επομένως αυτή η πρόταση δεν ισχύει πλέον.",
"summary": "{total} προτάσεις · {pending} σε εκκρεμότητα · {accepted} αποδεκτές",
"title": "Προτάσεις διόρθωσης AI",
"title": "Προτάσεις αυτόματης διόρθωσης",
"undo": "Αναίρεση αυτής της πρότασης",
"cancel": "Ακύρωση",
"close": "Κλείσιμο",
@@ -1321,9 +1327,11 @@
"compareHint": "Πιο αργό και κοστίζει περισσότερο, αλλά δείχνει σε ποιες προτάσεις συμφωνούν πολλαπλά μοντέλα",
"compareLabel": "Σύγκρινε πολλαπλά μοντέλα AI",
"conflictBadge": "παραλλαγή",
"conflictTooltip": "Τα μοντέλα διαφωνούν για αυτές τις λέξεις — αν αποδεχτείς μια παραλλαγή, απορρίπτεις τις υπόλοιπες.",
"conflictTooltip": "Υπάρχουν διαφορετικές προτάσεις για αυτές τις λέξεις — η αποδοχή μιας παραλλαγής απορρίπτει τις υπόλοιπες.",
"consensusBadge": "{consensus}/{total} μοντέλα",
"consensusTooltip": "Προτάθηκε από: {models}"
"consensusTooltip": "Προτάθηκε από: {models}",
"cachedBadge": "προσωρινά αποθηκευμένο",
"cachedTooltip": "Ανακτήθηκε από προηγούμενη επεξεργασία των ίδιων στίχων — δεν υπήρξε χρέωση AI."
}
},
"instrumentalReview": {
+17 -9
View File
@@ -757,6 +757,12 @@
"fadeOut": "Fade Out",
"fadeInSelection": "Fade in over the selected region",
"fadeOutSelection": "Fade out over the selected region",
"trimStartSelection": "Remove everything before the selection",
"trimEndSelection": "Remove everything after the selection",
"trimStartDisabledHint": "To trim the start, select a region that begins at the very start of the track",
"trimEndDisabledHint": "To trim the end, select a region that ends at the very end of the track",
"fadeInDisabledHint": "To fade in, select a region that begins at the very start of the track",
"fadeOutDisabledHint": "To fade out, select a region that ends at the very end of the track",
"undo": "Undo (Ctrl+Z)",
"redo": "Redo (Ctrl+Shift+Z)",
"playPause": "Play/Pause (Space)",
@@ -807,7 +813,7 @@
"acceptAll": "Accept All",
"revertAll": "Revert All",
"undoAll": "Undo All",
"resetAllChanges": "Reset all changes back to the original AI-corrected lyrics",
"resetAllChanges": "Reset all changes back to the original corrected lyrics",
"undo": "Undo",
"redo": "Redo",
"findReplace": "Find/Replace",
@@ -821,8 +827,8 @@
"loadingAudio": "Loading audio...",
"audioStillLoading": "Audio is still loading...",
"audioLoadError": "Couldn't load audio",
"autoCorrect": "AI Suggest",
"autoCorrectDesc": "Generate AI correction suggestions by comparing the transcription against the reference lyrics. Nothing is changed until you accept each suggestion."
"autoCorrect": "Auto-correct",
"autoCorrectDesc": "Generate correction suggestions by comparing the transcription against the reference lyrics. Nothing is changed until you accept each suggestion."
},
"guidance": {
"showTips": "Show tips",
@@ -1282,23 +1288,23 @@
"resetOverridesTooltip": "Reset word overrides in this segment"
},
"autoCorrect": {
"title": "AI correction suggestions",
"description": "The AI compares the transcribed lyrics against the reference sources and suggests word-level fixes. You review every suggestion — nothing is applied until you accept it.",
"noReferences": "No reference lyrics are available for this song, so AI suggestions can’t be generated. Add lyrics from the reference panel first.",
"title": "Auto-correct suggestions",
"description": "Auto-correct compares the transcribed lyrics against the reference sources and suggests word-level fixes. You review every suggestion — nothing is applied until you accept it.",
"noReferences": "No reference lyrics are available for this song, so suggestions can’t be generated. Add lyrics from the reference panel first.",
"running": "Analyzing lyrics… this usually takes 15–60 seconds.",
"adlibRemovalLabel": "Suggest removing adlibs",
"adlibRemovalHint": "Allow suggestions that delete backing vocals the references don’t have",
"insertionsLabel": "Suggest missing words",
"insertionsHint": "Allow suggestions that insert words the transcription missed",
"confidenceLabel": "Suggestion filter",
"confidenceHint": "How confident the AI must be to show a suggestion",
"confidenceHint": "How confident a suggestion must be before it’s shown",
"confidence_all": "Show all",
"confidence_balanced": "Balanced",
"confidence_high": "High confidence",
"cancel": "Cancel",
"close": "Close",
"runButton": "Get suggestions",
"noSuggestions": "No issues found — the AI has no suggested changes.",
"noSuggestions": "No issues found — there are no suggested changes.",
"summary": "{total} suggestions · {pending} pending · {accepted} accepted",
"acceptAll": "Accept all",
"rejectAll": "Reject all",
@@ -1323,7 +1329,9 @@
"consensusBadge": "{consensus}/{total} models",
"consensusTooltip": "Proposed by: {models}",
"conflictBadge": "variant",
"conflictTooltip": "Models disagree about these words — accepting one variant rejects the others."
"conflictTooltip": "There are different suggestions for these words — accepting one variant rejects the others.",
"cachedBadge": "cached",
"cachedTooltip": "Restored from a previous run on the same lyrics — no AI cost was incurred."
}
},
"instrumentalReview": {
+19 -11
View File
@@ -780,7 +780,13 @@
"fadeIn": "Fundido de entrada",
"fadeInSelection": "Aplicar fundido de entrada en la región seleccionada",
"fadeOut": "Fundido de salida",
"fadeOutSelection": "Aplicar fundido de salida en la región seleccionada"
"fadeOutSelection": "Aplicar fundido de salida en la región seleccionada",
"fadeInDisabledHint": "Para hacer un fundido de entrada, selecciona una región que comience justo al principio de la pista",
"fadeOutDisabledHint": "Para hacer un fundido de salida, selecciona una región que termine justo al final de la pista",
"trimEndDisabledHint": "Para recortar el final, selecciona una región que termine justo al final de la pista",
"trimEndSelection": "Eliminar todo después de la selección",
"trimStartDisabledHint": "Para recortar el principio, selecciona una región que comience justo al principio de la pista",
"trimStartSelection": "Eliminar todo antes de la selección"
},
"audioEditRestore": {
"title": "Sesiones de edición de audio guardadas",
@@ -807,7 +813,7 @@
"acceptAll": "Aceptar todo",
"revertAll": "Revertir todo",
"undoAll": "Deshacer todo",
"resetAllChanges": "Restablecer todos los cambios a las letras originales corregidas por IA",
"resetAllChanges": "Restablecer todos los cambios a las letras corregidas originales",
"undo": "Deshacer",
"redo": "Rehacer",
"findReplace": "Buscar/Reemplazar",
@@ -821,8 +827,8 @@
"audioLoadError": "No se pudo cargar el audio",
"audioStillLoading": "El audio aún se está cargando...",
"loadingAudio": "Cargando audio...",
"autoCorrect": "Sugerencia de IA",
"autoCorrectDesc": "Genera sugerencias de corrección de IA comparando la transcripción con las letras de referencia. No se cambia nada hasta que aceptes cada sugerencia."
"autoCorrect": "Autocorrección",
"autoCorrectDesc": "Genera sugerencias de corrección comparando la transcripción con las letras de referencia. No se cambia nada hasta que aceptas cada sugerencia."
},
"guidance": {
"showTips": "Mostrar consejos",
@@ -1294,18 +1300,18 @@
"category_other": "otro",
"category_repeated_chorus_fix": "estribillo",
"collapse": "Contraer sugerencias",
"confidenceHint": "Qué tan segura debe estar la IA para mostrar una sugerencia",
"confidenceHint": "Qué nivel de confianza debe tener una sugerencia para mostrarse",
"confidenceLabel": "Filtro de sugerencias",
"confidence_all": "Mostrar todas",
"confidence_high": "Alta confianza",
"description": "La IA compara las letras transcritas con las fuentes de referencia y sugiere correcciones a nivel de palabra. Tú revisas cada sugerencia — no se aplica nada hasta que la aceptes.",
"description": "La autocorrección compara las letras transcritas con las fuentes de referencia y sugiere correcciones a nivel de palabra. Revisas cada sugerencia — no se aplica nada hasta que la aceptas.",
"dismiss": "Descartar sugerencias",
"expand": "Expandir sugerencias",
"insertMarker": "insertar:",
"insertionsHint": "Permitir sugerencias que inserten palabras que la transcripción omitió",
"insertionsLabel": "Sugerir palabras faltantes",
"noReferences": "No hay letras de referencia disponibles para esta canción, por lo que no se pueden generar sugerencias de IA. Agrega letras desde el panel de referencia primero.",
"noSuggestions": "No se encontraron problemas — la IA no tiene cambios sugeridos.",
"noReferences": "No hay letras de referencia disponibles para esta canción, por lo que no se pueden generar sugerencias. Primero añade letras desde el panel de referencia.",
"noSuggestions": "No se encontraron problemas — no hay cambios sugeridos.",
"reject": "Rechazar sugerencia",
"rejectAll": "Rechazar todas",
"rejected": "Rechazada",
@@ -1313,7 +1319,7 @@
"running": "Analizando letras… esto suele tardar entre 15 y 60 segundos.",
"staleHint": "Estas palabras fueron editadas desde que se generaron las sugerencias, por lo que esta sugerencia ya no es válida.",
"summary": "{total} sugerencias · {pending} pendientes · {accepted} aceptadas",
"title": "Sugerencias de corrección de IA",
"title": "Sugerencias de autocorrección",
"undo": "Deshacer esta sugerencia",
"cancel": "Cancelar",
"close": "Cerrar",
@@ -1321,9 +1327,11 @@
"compareHint": "Es más lento y cuesta más, pero muestra en qué sugerencias coinciden varios modelos",
"compareLabel": "Comparar varios modelos de IA",
"conflictBadge": "variante",
"conflictTooltip": "Los modelos no coinciden en estas palabras; al aceptar una variante, se rechazan las demás.",
"conflictTooltip": "Hay diferentes sugerencias para estas palabras — al aceptar una variante se rechazan las demás.",
"consensusBadge": "{consensus}/{total} modelos",
"consensusTooltip": "Propuesto por: {models}"
"consensusTooltip": "Propuesto por: {models}",
"cachedBadge": "en caché",
"cachedTooltip": "Restaurado de una ejecución anterior con las mismas letras — no generó costos de IA."
}
},
"instrumentalReview": {
+19 -11
View File
@@ -780,7 +780,13 @@
"fadeIn": "Häivytä sisään",
"fadeInSelection": "Häivytä sisään valitulla alueella",
"fadeOut": "Häivytä ulos",
"fadeOutSelection": "Häivytä ulos valitulla alueella"
"fadeOutSelection": "Häivytä ulos valitulla alueella",
"fadeInDisabledHint": "Jos haluat lisätä sisäänhäivytyksen, valitse alue, joka alkaa aivan raidan alusta",
"fadeOutDisabledHint": "Jos haluat lisätä uloshäivytyksen, valitse alue, joka päättyy aivan raidan loppuun",
"trimEndDisabledHint": "Jos haluat leikata lopun, valitse alue, joka päättyy aivan raidan loppuun",
"trimEndSelection": "Poista kaikki valinnan jälkeen",
"trimStartDisabledHint": "Jos haluat leikata alun, valitse alue, joka alkaa aivan raidan alusta",
"trimStartSelection": "Poista kaikki ennen valintaa"
},
"audioEditRestore": {
"title": "Tallennetut äänimuokkausistunnot",
@@ -807,7 +813,7 @@
"acceptAll": "Hyväksy kaikki",
"revertAll": "Palauta kaikki",
"undoAll": "Kumoa kaikki",
"resetAllChanges": "Palauta kaikki muutokset takaisin alkuperäisiin tekoälyn korjaamiin sanoituksiin",
"resetAllChanges": "Peru kaikki muutokset ja palauta alkuperäiset korjatut sanoitukset",
"undo": "Kumoa",
"redo": "Tee uudelleen",
"findReplace": "Etsi/Korvaa",
@@ -821,8 +827,8 @@
"audioLoadError": "Ääntä ei voitu ladata",
"audioStillLoading": "Ääni latautuu yhä...",
"loadingAudio": "Ladataan ääntä...",
"autoCorrect": "Tekoälyn ehdotukset",
"autoCorrectDesc": "Luo tekoälyn korjausehdotuksia vertaamalla transkriptiota viitesanoituksiin. Mitään ei muuteta ennen kuin hyväksyt jokaisen ehdotuksen."
"autoCorrect": "Automaattinen korjaus",
"autoCorrectDesc": "Luo korjausehdotuksia vertaamalla litterointia vertailusanoituksiin. Mitään ei muuteta ennen kuin hyväksyt jokaisen ehdotuksen."
},
"guidance": {
"showTips": "Näytä vinkit",
@@ -1294,18 +1300,18 @@
"category_other": "muu",
"category_repeated_chorus_fix": "kertosäe",
"collapse": "Pienennä ehdotukset",
"confidenceHint": "Kuinka varma tekoälyn on oltava näyttääkseen ehdotuksen",
"confidenceHint": "Kuinka varma ehdotuksen pitää olla, jotta se näytetään",
"confidenceLabel": "Ehdotusten suodatin",
"confidence_all": "Näytä kaikki",
"confidence_high": "Korkea varmuus",
"description": "Tekoäly vertaa transkriptoituja sanoituksia viitelähteisiin ja ehdottaa sanakohtaisia korjauksia. Tarkistat jokaisen ehdotuksen — mitään ei muuteta ennen kuin hyväksyt sen.",
"description": "Automaattinen korjaus vertaa litteroituja sanoituksia vertailulähteisiin ja ehdottaa sanakohtaisia korjauksia. Käyt läpi jokaisen ehdotuksen — mitään ei oteta käyttöön ennen kuin hyväksyt sen.",
"dismiss": "Ohita ehdotukset",
"expand": "Laajenna ehdotukset",
"insertMarker": "lisää:",
"insertionsHint": "Salli ehdotukset, jotka lisäävät transkriptiosta puuttuvia sanoja",
"insertionsLabel": "Ehdotukset puuttuvien sanojen lisäämisestä",
"noReferences": "Tälle kappaleelle ei ole saatavilla viitesanoituksia, joten tekoälyehdotuksia ei voida luoda. Lisää sanoitukset ensin viitepaneelista.",
"noSuggestions": "Ongelmia ei löytynyt — tekoäly ei ehdota muutoksia.",
"noReferences": "Tälle kappaleelle ei ole saatavilla vertailusanoituksia, joten ehdotuksia ei voida luoda. Lisää sanoitukset ensin vertailupaneelista.",
"noSuggestions": "Ongelmia ei löytynyt — ei ehdotettuja muutoksia.",
"reject": "Hylkää ehdotus",
"rejectAll": "Hylkää kaikki",
"rejected": "Hylätty",
@@ -1313,7 +1319,7 @@
"running": "Analysoidaan sanoituksia… tässä kestää yleensä 15–60 sekuntia.",
"staleHint": "Näitä sanoja on muokattu sen jälkeen, kun ehdotukset luotiin, joten tämä ehdotus ei enää päde.",
"summary": "{total} ehdotusta · {pending} odottaa · {accepted} hyväksytty",
"title": "Tekoälyn korjausehdotukset",
"title": "Automaattisen korjauksen ehdotukset",
"undo": "Kumoa tämä ehdotus",
"cancel": "Peruuta",
"close": "Sulje",
@@ -1321,9 +1327,11 @@
"compareHint": "Hitaampi ja kalliimpi, mutta näyttää, mistä ehdotuksista useampi malli on samaa mieltä",
"compareLabel": "Vertaile useita tekoälymalleja",
"conflictBadge": "vaihtoehto",
"conflictTooltip": "Mallit ovat eri mieltä näistä sanoista — yhden vaihtoehdon hyväksyminen hylkää muut.",
"conflictTooltip": "Näille sanoille on eri ehdotuksia — yhden vaihtoehdon hyväksyminen hylkää muut.",
"consensusBadge": "{consensus}/{total} mallia",
"consensusTooltip": "Ehdottanut: {models}"
"consensusTooltip": "Ehdottanut: {models}",
"cachedBadge": "välimuistissa",
"cachedTooltip": "Palautettu aiemmasta ajosta samoilla sanoituksilla — tekoälykustannuksia ei syntynyt."
}
},
"instrumentalReview": {
+19 -11
View File
@@ -780,7 +780,13 @@
"fadeIn": "Fondu entrant",
"fadeInSelection": "Fondu entrant sur la zone sélectionnée",
"fadeOut": "Fondu sortant",
"fadeOutSelection": "Fondu sortant sur la zone sélectionnée"
"fadeOutSelection": "Fondu sortant sur la zone sélectionnée",
"fadeInDisabledHint": "Pour faire un fondu en ouverture, sélectionne une région qui commence tout au début de la piste",
"fadeOutDisabledHint": "Pour faire un fondu en fermeture, sélectionne une région qui se termine tout à la fin de la piste",
"trimEndDisabledHint": "Pour couper la fin, sélectionne une région qui se termine tout à la fin de la piste",
"trimEndSelection": "Tout supprimer après la sélection",
"trimStartDisabledHint": "Pour couper le début, sélectionne une région qui commence tout au début de la piste",
"trimStartSelection": "Tout supprimer avant la sélection"
},
"audioEditRestore": {
"title": "Sessions d'édition audio sauvegardées",
@@ -807,7 +813,7 @@
"acceptAll": "Tout accepter",
"revertAll": "Tout annuler",
"undoAll": "Tout défaire",
"resetAllChanges": "Réinitialiser toutes les modifications aux paroles originales corrigées par l'IA",
"resetAllChanges": "Réinitialiser toutes les modifications pour revenir aux paroles corrigées d'origine",
"undo": "Annuler",
"redo": "Rétablir",
"findReplace": "Chercher/Remplacer",
@@ -821,8 +827,8 @@
"audioLoadError": "Impossible de charger l'audio",
"audioStillLoading": "L'audio est toujours en cours de chargement...",
"loadingAudio": "Chargement de l'audio...",
"autoCorrect": "Suggestions de l'IA",
"autoCorrectDesc": "Génère des suggestions de correction de l'IA en comparant la transcription aux paroles de référence. Rien n'est modifié tant que tu n'acceptes pas chaque suggestion."
"autoCorrect": "Correction automatique",
"autoCorrectDesc": "Génère des suggestions de correction en comparant la transcription aux paroles de référence. Rien n'est modifié tant que tu n'as pas accepté chaque suggestion."
},
"guidance": {
"showTips": "Afficher les conseils",
@@ -1294,18 +1300,18 @@
"category_other": "autre",
"category_repeated_chorus_fix": "refrain",
"collapse": "Réduire les suggestions",
"confidenceHint": "Le niveau de certitude requis par l'IA pour afficher une suggestion",
"confidenceHint": "Le niveau de certitude requis pour qu'une suggestion soit affichée",
"confidenceLabel": "Filtre de suggestions",
"confidence_all": "Tout afficher",
"confidence_high": "Certitude élevée",
"description": "L'IA compare les paroles transcrites aux sources de référence et suggère des corrections mot par mot. Tu examines chaque suggestion — rien n'est appliqué tant que tu ne l'as pas acceptée.",
"description": "La correction automatique compare les paroles transcrites aux sources de référence et suggère des corrections mot par mot. Tu examines chaque suggestion — rien n'est appliqué tant que tu ne l'as pas acceptée.",
"dismiss": "Ignorer les suggestions",
"expand": "Développer les suggestions",
"insertMarker": "insérer :",
"insertionsHint": "Autoriser les suggestions qui insèrent les mots manquants dans la transcription",
"insertionsLabel": "Suggérer les mots manquants",
"noReferences": "Il n'y a pas de paroles de référence pour cette chanson, les suggestions de l'IA ne peuvent donc pas être générées. Ajoute d'abord des paroles depuis le panneau de référence.",
"noSuggestions": "Aucun problème trouvé — l'IA n'a aucune modification à suggérer.",
"noReferences": "Il n'y a pas de paroles de référence disponibles pour cette chanson, les suggestions ne peuvent donc pas être générées. Ajoute d'abord des paroles depuis le panneau de référence.",
"noSuggestions": "Aucun problème trouvé — il n'y a aucune modification suggérée.",
"reject": "Rejeter la suggestion",
"rejectAll": "Tout rejeter",
"rejected": "Rejeté",
@@ -1313,7 +1319,7 @@
"running": "Analyse des paroles… cela prend généralement 15 à 60 secondes.",
"staleHint": "Ces mots ont été modifiés depuis la génération des suggestions, celle-ci ne s'applique donc plus.",
"summary": "{total} suggestions · {pending} en attente · {accepted} acceptées",
"title": "Suggestions de correction de l'IA",
"title": "Suggestions de correction automatique",
"undo": "Annuler cette suggestion",
"cancel": "Annuler",
"close": "Fermer",
@@ -1321,9 +1327,11 @@
"compareHint": "Plus lent et plus cher, mais montre les suggestions sur lesquelles plusieurs modèles s'accordent",
"compareLabel": "Comparer plusieurs modèles d'IA",
"conflictBadge": "variante",
"conflictTooltip": "Les modèles ne sont pas d'accord sur ces mots — accepter une variante rejette les autres.",
"conflictTooltip": "Plusieurs suggestions sont proposées pour ces mots — en accepter une rejette les autres.",
"consensusBadge": "{consensus}/{total} modèles",
"consensusTooltip": "Proposé par : {models}"
"consensusTooltip": "Proposé par : {models}",
"cachedBadge": "en cache",
"cachedTooltip": "Restauré depuis un traitement précédent sur les mêmes paroles — aucun coût d'IA n'a été engagé."
}
},
"instrumentalReview": {
+19 -11
View File
@@ -780,7 +780,13 @@
"fadeIn": "פייד אין",
"fadeInSelection": "החלת פייד אין על האזור הנבחר",
"fadeOut": "פייד אאוט",
"fadeOutSelection": "החלת פייד אאוט על האזור הנבחר"
"fadeOutSelection": "החלת פייד אאוט על האזור הנבחר",
"fadeInDisabledHint": "כדי לבצע הגברה הדרגתית, בחרו אזור שמתחיל בדיוק בתחילת הרצועה",
"fadeOutDisabledHint": "כדי לבצע הנמכה הדרגתית, בחרו אזור שמסתיים בדיוק בסוף הרצועה",
"trimEndDisabledHint": "כדי לחתוך את הסוף, בחרו אזור שמסתיים בדיוק בסוף הרצועה",
"trimEndSelection": "הסירו הכל אחרי האזור הנבחר",
"trimStartDisabledHint": "כדי לחתוך את ההתחלה, בחרו אזור שמתחיל בדיוק בתחילת הרצועה",
"trimStartSelection": "הסירו הכל לפני האזור הנבחר"
},
"audioEditRestore": {
"title": "הפעלות עריכת אודיו שמורות",
@@ -807,7 +813,7 @@
"acceptAll": "אשר הכל",
"revertAll": "החזר הכל",
"undoAll": "בטל הכל",
"resetAllChanges": "אפס את כל השינויים חזרה למילים המקוריות שתוקנו על ידי AI",
"resetAllChanges": "איפוס כל השינויים בחזרה למילים המתוקנות המקוריות",
"undo": "בטל",
"redo": "בצע שוב",
"findReplace": "חפש/החלף",
@@ -821,8 +827,8 @@
"audioLoadError": "לא הצלחנו לטעון את האודיו",
"audioStillLoading": "האודיו עדיין נטען...",
"loadingAudio": "טוען אודיו...",
"autoCorrect": "הצעות AI",
"autoCorrectDesc": "יצירת הצעות תיקון של AI על ידי השוואת התמלול למילות המקור. שום דבר לא ישתנה עד לאישור של כל הצעה."
"autoCorrect": "תיקון אוטומטי",
"autoCorrectDesc": "הפקת הצעות לתיקון על ידי השוואת התמלול למילות הייחוס. שום שינוי לא יחול עד לאישור כל הצעה."
},
"guidance": {
"showTips": "הצג טיפים",
@@ -1294,18 +1300,18 @@
"category_other": "אחר",
"category_repeated_chorus_fix": "פזמון",
"collapse": "צמצם הצעות",
"confidenceHint": "רמת הביטחון הנדרשת מה-AI כדי להציג הצעה",
"confidenceHint": "רמת הוודאות הנדרשת לפני שהצעה תוצג",
"confidenceLabel": "מסנן הצעות",
"confidence_all": "הצג הכל",
"confidence_high": "ביטחון גבוה",
"description": "ה-AI משווה את המילים שתומללו למקורות ומציע תיקונים ברמת המילה. באפשרותך לעבור על כל הצעה — שום שינוי לא יבוצע עד לאישור.",
"description": "התיקון האוטומטי משווה את המילים שתומללו למקורות הייחוס ומציע תיקונים ברמת המילה. באפשרותך לעבור על כל הצעה — שום שינוי לא יחול עד לאישורו.",
"dismiss": "הסתר הצעות",
"expand": "הרחב הצעות",
"insertMarker": "הוסף:",
"insertionsHint": "אפשר הצעות שמוסיפות מילים שהתפספסו בתמלול",
"insertionsLabel": "הצע מילים חסרות",
"noReferences": "אין מילות מקור זמינות לשיר זה, ולכן לא ניתן ליצור הצעות AI. יש להוסיף מילים מחלונית המקורות תחילה.",
"noSuggestions": "לא נמצאו בעיות — ל-AI אין שינויים להציע.",
"noReferences": "אין מילות ייחוס זמינות לשיר זה, ולכן לא ניתן להפיק הצעות. יש להוסיף תחילה מילים מחלונית הייחוס.",
"noSuggestions": "לא נמצאו בעיות — אין שינויים מוצעים.",
"reject": "דחה הצעה",
"rejectAll": "דחה הכל",
"rejected": "נדחה",
@@ -1313,7 +1319,7 @@
"running": "מנתח מילים… פעולה זו אורכת בדרך כלל 15–60 שניות.",
"staleHint": "מילים אלו נערכו מאז שההצעות נוצרו, ולכן הצעה זו כבר אינה רלוונטית.",
"summary": "{total} הצעות · {pending} ממתינות · {accepted} התקבלו",
"title": "הצעות תיקון של AI",
"title": "הצעות לתיקון אוטומטי",
"undo": "בטל הצעה זו",
"cancel": "ביטול",
"close": "סגירה",
@@ -1321,9 +1327,11 @@
"compareHint": "איטי ויקר יותר, אבל מראה על אילו הצעות מספר מודלים מסכימים",
"compareLabel": "השוואה בין מספר מודלי AI",
"conflictBadge": "גרסה",
"conflictTooltip": "המודלים לא מסכימים לגבי המילים האלו — אישור גרסה אחת ידחה את האחרות.",
"conflictTooltip": "ישנן הצעות שונות למילים אלו — אישור גרסה אחת ידחה את האחרות.",
"consensusBadge": "{consensus}/{total} מודלים",
"consensusTooltip": "הוצע על ידי: {models}"
"consensusTooltip": "הוצע על ידי: {models}",
"cachedBadge": "שמור במטמון",
"cachedTooltip": "שוחזר מהרצה קודמת על אותן מילים — ללא חיוב עלות AI."
}
},
"instrumentalReview": {
+19 -11
View File
@@ -780,7 +780,13 @@
"fadeIn": "फ़ेड इन",
"fadeInSelection": "चुने गए हिस्से पर फ़ेड इन करो",
"fadeOut": "फ़ेड आउट",
"fadeOutSelection": "चुने गए हिस्से पर फ़ेड आउट करो"
"fadeOutSelection": "चुने गए हिस्से पर फ़ेड आउट करो",
"fadeInDisabledHint": "फेड इन करने के लिए, एक ऐसा हिस्सा चुनो जो ट्रैक की बिल्कुल शुरुआत से शुरू होता हो",
"fadeOutDisabledHint": "फेड आउट करने के लिए, एक ऐसा हिस्सा चुनो जो ट्रैक के बिल्कुल अंत में खत्म होता हो",
"trimEndDisabledHint": "अंत को ट्रिम करने के लिए, एक ऐसा हिस्सा चुनो जो ट्रैक के बिल्कुल अंत में खत्म होता हो",
"trimEndSelection": "चुने हुए हिस्से के बाद का सब कुछ हटा दो",
"trimStartDisabledHint": "शुरुआत को ट्रिम करने के लिए, एक ऐसा हिस्सा चुनो जो ट्रैक की बिल्कुल शुरुआत से शुरू होता हो",
"trimStartSelection": "चुने हुए हिस्से से पहले का सब कुछ हटा दो"
},
"audioEditRestore": {
"title": "सेव किए गए ऑडियो एडिट सेशंस",
@@ -807,7 +813,7 @@
"acceptAll": "सभी एक्सेप्ट करो",
"revertAll": "सभी रिवर्ट करो",
"undoAll": "सभी अनडू करो",
"resetAllChanges": "सभी बदलावों को ओरिजिनल AI-करेक्टेड लिरिक्स पर रीसेट करो",
"resetAllChanges": "सभी बदलावों को वापस मूल सही किए गए लिरिक्स पर रीसेट करो",
"undo": "अनडू",
"redo": "रीडू",
"findReplace": "ढूंढो/बदलो",
@@ -821,8 +827,8 @@
"audioLoadError": "ऑडियो लोड नहीं हो सका",
"audioStillLoading": "ऑडियो अभी भी लोड हो रहा है...",
"loadingAudio": "ऑडियो लोड हो रहा है...",
"autoCorrect": "AI सुझाव",
"autoCorrectDesc": "ट्रांसक्रिप्शन की तुलना रेफरेंस लिरिक्स से करके AI सुधार के सुझाव पाओ। जब तक तुम हर सुझाव को स्वीकार नहीं करते, तब तक कुछ भी नहीं बदलता।"
"autoCorrect": "ऑटो-करेक्ट",
"autoCorrectDesc": "ट्रांसक्रिप्शन की तुलना रेफरेंस लिरिक्स से करके सुधार के सुझाव जनरेट करो। जब तक तुम हर सुझाव को स्वीकार नहीं करते, तब तक कुछ नहीं बदलता।"
},
"guidance": {
"showTips": "टिप्स दिखाओ",
@@ -1294,18 +1300,18 @@
"category_other": "अन्य",
"category_repeated_chorus_fix": "कोरस",
"collapse": "सुझाव छिपाओ",
"confidenceHint": "सुझाव दिखाने के लिए AI को कितना आश्वस्त होना चाहिए",
"confidenceHint": "दिखाए जाने से पहले किसी सुझाव का कितना सटीक होना ज़रूरी है",
"confidenceLabel": "सुझाव फ़िल्टर",
"confidence_all": "सभी दिखाओ",
"confidence_high": "ज़्यादा आश्वस्त",
"description": "AI ट्रांसक्राइब किए गए लिरिक्स की तुलना रेफरेंस से करता है और शब्दों में सुधार के सुझाव देता है। तुम हर सुझाव की समीक्षा कर सकते हो — जब तक तुम उसे स्वीकार नहीं करते, तब तक कुछ भी लागू नहीं होता।",
"description": "ऑटो-करेक्ट ट्रांसक्राइब किए गए लिरिक्स की तुलना रेफरेंस सोर्स से करता है और शब्दों को ठीक करने के सुझाव देता है। तुम हर सुझाव का रिव्यू कर सकते हो — जब तक तुम इसे स्वीकार नहीं करते, तब तक कुछ भी लागू नहीं होता।",
"dismiss": "सुझाव हटाओ",
"expand": "सुझाव पूरे दिखाओ",
"insertMarker": "जोड़ो:",
"insertionsHint": "उन सुझावों को अनुमति दो जो ट्रांसक्रिप्शन में छूटे हुए शब्दों को जोड़ते हैं",
"insertionsLabel": "छूटे हुए शब्दों का सुझाव दो",
"noReferences": "इस गाने के लिए कोई रेफरेंस लिरिक्स उपलब्ध नहीं हैं, इसलिए AI सुझाव नहीं दे सकता। पहले रेफरेंस पैनल से लिरिक्स जोड़ो।",
"noSuggestions": "कोई समस्या नहीं मिली — AI के पास बदलाव के लिए कोई सुझाव नहीं है।",
"noReferences": "इस गाने के लिए कोई रेफरेंस लिरिक्स उपलब्ध नहीं हैं, इसलिए सुझाव जनरेट नहीं किए जा सकते। पहले रेफरेंस पैनल से लिरिक्स जोड़ो।",
"noSuggestions": "कोई समस्या नहीं मिली — बदलाव के लिए कोई सुझाव नहीं हैं।",
"reject": "सुझाव अस्वीकार करो",
"rejectAll": "सभी अस्वीकार करो",
"rejected": "अस्वीकार किया गया",
@@ -1313,7 +1319,7 @@
"running": "लिरिक्स का विश्लेषण हो रहा है… इसमें आमतौर पर 15–60 सेकंड लगते हैं।",
"staleHint": "सुझाव आने के बाद इन शब्दों को एडिट किया गया था, इसलिए यह सुझाव अब लागू नहीं होता।",
"summary": "{total} सुझाव · {pending} लंबित · {accepted} स्वीकार किए गए",
"title": "AI सुधार सुझाव",
"title": "ऑटो-करेक्ट सुझाव",
"undo": "इस सुझाव को पूर्ववत करो",
"cancel": "कैंसल",
"close": "बंद करो",
@@ -1321,9 +1327,11 @@
"compareHint": "यह धीमा है और इसमें ज़्यादा खर्च आता है, लेकिन यह दिखाता है कि किन सुझावों पर कई मॉडल सहमत हैं",
"compareLabel": "कई AI मॉडलों की तुलना करो",
"conflictBadge": "विकल्प",
"conflictTooltip": "इन शब्दों पर मॉडल असहमत हैं — एक विकल्प को स्वीकार करने से बाकी अस्वीकार हो जाते हैं।",
"conflictTooltip": "इन शब्दों के लिए अलग-अलग सुझाव हैं — एक विकल्प को स्वीकार करने पर बाकी अस्वीकार हो जाएंगे।",
"consensusBadge": "{consensus}/{total} मॉडल",
"consensusTooltip": "इनके द्वारा प्रस्तावित: {models}"
"consensusTooltip": "इनके द्वारा प्रस्तावित: {models}",
"cachedBadge": "कैश्ड",
"cachedTooltip": "इन्हीं लिरिक्स पर पिछले रन से रीस्टोर किया गया — कोई AI लागत नहीं आई।"
}
},
"instrumentalReview": {
+19 -11
View File
@@ -780,7 +780,13 @@
"fadeIn": "Postupno pojačavanje",
"fadeInSelection": "Postupno pojačaj odabrano područje",
"fadeOut": "Postupno stišavanje",
"fadeOutSelection": "Postupno stišaj odabrano područje"
"fadeOutSelection": "Postupno stišaj odabrano područje",
"fadeInDisabledHint": "Za postepeno pojačavanje zvuka, odaberi dio koji počinje na samom početku trake",
"fadeOutDisabledHint": "Za postepeno stišavanje zvuka, odaberi dio koji završava na samom kraju trake",
"trimEndDisabledHint": "Za skraćivanje kraja, odaberi dio koji završava na samom kraju trake",
"trimEndSelection": "Ukloni sve nakon odabira",
"trimStartDisabledHint": "Za skraćivanje početka, odaberi dio koji počinje na samom početku trake",
"trimStartSelection": "Ukloni sve prije odabira"
},
"audioEditRestore": {
"title": "Spremljene sesije uređivanja zvuka",
@@ -807,7 +813,7 @@
"acceptAll": "Prihvati sve",
"revertAll": "Vrati sve",
"undoAll": "Poništi sve",
"resetAllChanges": "Poništi sve promjene natrag na originalni AI-ispravljeni tekst",
"resetAllChanges": "Poništi sve promjene i vrati na izvorni ispravljeni tekst",
"undo": "Poništi",
"redo": "Ponovi",
"findReplace": "Pronađi/Zamijeni",
@@ -821,8 +827,8 @@
"audioLoadError": "Nije moguće učitati audio",
"audioStillLoading": "Audio se još uvijek učitava...",
"loadingAudio": "Učitavanje audija...",
"autoCorrect": "AI prijedlog",
"autoCorrectDesc": "Generiraj AI prijedloge za ispravak uspoređujući transkripciju s referentnim tekstom. Ništa se ne mijenja dok ne prihvatiš svaki prijedlog."
"autoCorrect": "Automatski ispravak",
"autoCorrectDesc": "Generiraj prijedloge za ispravak usporedbom transkripcije s referentnim tekstom. Ništa se ne mijenja dok ne prihvatiš svaki prijedlog."
},
"guidance": {
"showTips": "Prikaži savjete",
@@ -1294,18 +1300,18 @@
"category_other": "ostalo",
"category_repeated_chorus_fix": "refren",
"collapse": "Sažmi prijedloge",
"confidenceHint": "Koliko AI mora biti siguran da bi prikazao prijedlog",
"confidenceHint": "Koliko prijedlog mora biti pouzdan prije nego što se prikaže",
"confidenceLabel": "Filtar prijedloga",
"confidence_all": "Prikaži sve",
"confidence_high": "Visoka pouzdanost",
"description": "AI uspoređuje transkribirani tekst s referentnim izvorima i predlaže ispravke na razini riječi. Pregledavaš svaki prijedlog — ništa se ne primjenjuje dok ga ne prihvatiš.",
"description": "Automatski ispravak uspoređuje transkribirani tekst s referentnim izvorima i predlaže ispravke na razini riječi. Pregledavaš svaki prijedlog — ništa se ne primjenjuje dok ga ne prihvatiš.",
"dismiss": "Odbaci prijedloge",
"expand": "Proširi prijedloge",
"insertMarker": "umetni:",
"insertionsHint": "Dopusti prijedloge za umetanje riječi koje nedostaju u transkripciji",
"insertionsLabel": "Predloži riječi koje nedostaju",
"noReferences": "Za ovu pjesmu nema referentnog teksta, pa se AI prijedlozi ne mogu generirati. Prvo dodaj tekst iz referentnog panela.",
"noSuggestions": "Nisu pronađeni problemi — AI nema predloženih promjena.",
"noReferences": "Za ovu pjesmu nema dostupnog referentnog teksta, pa se prijedlozi ne mogu generirati. Prvo dodaj tekst iz referentnog panela.",
"noSuggestions": "Nisu pronađeni problemi — nema predloženih promjena.",
"reject": "Odbij prijedlog",
"rejectAll": "Odbij sve",
"rejected": "Odbijeno",
@@ -1313,7 +1319,7 @@
"running": "Analiziram tekst… ovo obično traje 15–60 sekundi.",
"staleHint": "Ove su riječi uređene nakon generiranja prijedloga, pa ovaj prijedlog više ne vrijedi.",
"summary": "{total} prijedloga · {pending} na čekanju · {accepted} prihvaćeno",
"title": "AI prijedlozi za ispravak",
"title": "Prijedlozi automatskog ispravka",
"undo": "Poništi ovaj prijedlog",
"cancel": "Odustani",
"close": "Zatvori",
@@ -1321,9 +1327,11 @@
"compareHint": "Sporije je i košta više, ali pokazuje oko kojih se prijedloga slaže više modela",
"compareLabel": "Usporedi više AI modela",
"conflictBadge": "varijanta",
"conflictTooltip": "Modeli se ne slažu oko ovih riječi — prihvaćanje jedne varijante odbacuje ostale.",
"conflictTooltip": "Postoje različiti prijedlozi za ove riječi — prihvaćanjem jedne varijante odbacuješ ostale.",
"consensusBadge": "{consensus}/{total} modela",
"consensusTooltip": "Predložili: {models}"
"consensusTooltip": "Predložili: {models}",
"cachedBadge": "predmemorirano",
"cachedTooltip": "Obnovljeno iz prethodnog pokretanja s istim tekstom pjesme — nije bilo troškova za AI."
}
},
"instrumentalReview": {
+19 -11
View File
@@ -780,7 +780,13 @@
"fadeIn": "Felerősítés",
"fadeInSelection": "Felerősítés a kijelölt szakaszon",
"fadeOut": "Elhalkítás",
"fadeOutSelection": "Elhalkítás a kijelölt szakaszon"
"fadeOutSelection": "Elhalkítás a kijelölt szakaszon",
"fadeInDisabledHint": "A felerősítéshez jelölj ki egy olyan részt, amely pontosan a sáv legeléjén kezdődik",
"fadeOutDisabledHint": "Az elhalkításhoz jelölj ki egy olyan részt, amely pontosan a sáv legvégéig tart",
"trimEndDisabledHint": "A végének levágásához jelölj ki egy olyan részt, amely pontosan a sáv legvégéig tart",
"trimEndSelection": "Minden eltávolítása a kijelölés után",
"trimStartDisabledHint": "Az elejének levágásához jelölj ki egy olyan részt, amely pontosan a sáv legeléjén kezdődik",
"trimStartSelection": "Minden eltávolítása a kijelölés előtt"
},
"audioEditRestore": {
"title": "Mentett hangszerkesztési munkamenetek",
@@ -807,7 +813,7 @@
"acceptAll": "Összes elfogadása",
"revertAll": "Összes visszaállítása",
"undoAll": "Összes visszavonása",
"resetAllChanges": "Minden változtatás visszaállítása az eredeti AI által javított dalszövegre",
"resetAllChanges": "Minden módosítás visszaállítása az eredeti, javított dalszövegre",
"undo": "Visszavonás",
"redo": "Újra",
"findReplace": "Keresés/Csere",
@@ -821,8 +827,8 @@
"audioLoadError": "Nem sikerült betölteni a hanganyagot",
"audioStillLoading": "A hanganyag még töltődik...",
"loadingAudio": "Hanganyag betöltése...",
"autoCorrect": "MI-javaslat",
"autoCorrectDesc": "Generálj MI-javítási javaslatokat az átírás és a referenciadalszöveg összehasonlításával. Semmi sem változik, amíg el nem fogadod az egyes javaslatokat."
"autoCorrect": "Automatikus javítás",
"autoCorrectDesc": "Javítási javaslatok generálása a leírt és a referencia-dalszöveg összehasonlításával. Semmi sem módosul, amíg el nem fogadod az egyes javaslatokat."
},
"guidance": {
"showTips": "Tippek mutatása",
@@ -1294,18 +1300,18 @@
"category_other": "egyéb",
"category_repeated_chorus_fix": "refrén",
"collapse": "Javaslatok összecsukása",
"confidenceHint": "Milyen biztosnak kell lennie az MI-nek ahhoz, hogy megjelenítsen egy javaslatot",
"confidenceHint": "Mennyire legyen biztos a javaslat, mielőtt megjelenik",
"confidenceLabel": "Javaslatszűrő",
"confidence_all": "Összes megjelenítése",
"confidence_high": "Nagy bizonyosság",
"description": "Az MI összehasonlítja az átírt dalszöveget a referenciaforrásokkal, és szószintű javításokat javasol. Minden javaslatot átnézhetsz — semmi sem módosul, amíg el nem fogadod.",
"description": "Az automatikus javítás összehasonlítja a leírt dalszöveget a referenciaforrásokkal, és szavankénti javításokat javasol. Minden javaslatot átnézhetsz — semmi sem módosul, amíg el nem fogadod.",
"dismiss": "Javaslatok elvetése",
"expand": "Javaslatok kibontása",
"insertMarker": "beszúrás:",
"insertionsHint": "Engedélyezd az olyan javaslatokat, amelyek beszúrják az átírásból kimaradt szavakat",
"insertionsLabel": "Hiányzó szavak javaslata",
"noReferences": "Ehhez a dalhoz nem érhető el referenciadalszöveg, így az MI nem tud javaslatokat tenni. Először adj hozzá dalszöveget a referenciapanelen.",
"noSuggestions": "Nem találtunk problémát — az MI-nek nincsenek módosítási javaslatai.",
"noReferences": "Ehhez a dalhoz nincs elérhető referencia-dalszöveg, így nem tudunk javaslatokat generálni. Először adj hozzá dalszöveget a referenciapanelen.",
"noSuggestions": "Nem találtunk problémát — nincsenek javasolt módosítások.",
"reject": "Javaslat elutasítása",
"rejectAll": "Összes elutasítása",
"rejected": "Elutasítva",
@@ -1313,7 +1319,7 @@
"running": "Dalszöveg elemzése… ez általában 15–60 másodpercet vesz igénybe.",
"staleHint": "Ezeket a szavakat módosítottad a javaslatok generálása óta, így ez a javaslat már nem érvényes.",
"summary": "{total} javaslat · {pending} függőben · {accepted} elfogadva",
"title": "MI-javítási javaslatok",
"title": "Automatikus javítási javaslatok",
"undo": "Javaslat visszavonása",
"cancel": "Mégse",
"close": "Bezárás",
@@ -1321,9 +1327,11 @@
"compareHint": "Lassabb és többe kerül, de megmutatja, mely javaslatokban ért egyet több modell.",
"compareLabel": "Több MI-modell összehasonlítása",
"conflictBadge": "változat",
"conflictTooltip": "A modellek nem értenek egyet ezeknél a szavaknál — egy változat elfogadásával elutasítod a többit.",
"conflictTooltip": "Több különböző javaslat is van ezekre a szavakra — az egyik változat elfogadásával elutasítod a többit.",
"consensusBadge": "{consensus}/{total} modell",
"consensusTooltip": "Javasolta: {models}"
"consensusTooltip": "Javasolta: {models}",
"cachedBadge": "gyorsítótárazott",
"cachedTooltip": "Egy korábbi, azonos dalszövegen végzett futtatásból visszaállítva — nem merült fel AI-költség."
}
},
"instrumentalReview": {
+19 -11
View File
@@ -780,7 +780,13 @@
"fadeIn": "Fade In",
"fadeInSelection": "Terapkan fade in pada bagian yang dipilih",
"fadeOut": "Fade Out",
"fadeOutSelection": "Terapkan fade out pada bagian yang dipilih"
"fadeOutSelection": "Terapkan fade out pada bagian yang dipilih",
"fadeInDisabledHint": "Untuk menerapkan fade in, pilih bagian yang dimulai tepat dari awal trek",
"fadeOutDisabledHint": "Untuk menerapkan fade out, pilih bagian yang berakhir tepat di akhir trek",
"trimEndDisabledHint": "Untuk memotong bagian akhir, pilih bagian yang berakhir tepat di akhir trek",
"trimEndSelection": "Hapus semua setelah bagian yang dipilih",
"trimStartDisabledHint": "Untuk memotong bagian awal, pilih bagian yang dimulai tepat dari awal trek",
"trimStartSelection": "Hapus semua sebelum bagian yang dipilih"
},
"audioEditRestore": {
"title": "Sesi Edit Audio Tersimpan",
@@ -807,7 +813,7 @@
"acceptAll": "Terima Semua",
"revertAll": "Kembalikan Semua",
"undoAll": "Batalkan Semua",
"resetAllChanges": "Atur ulang semua perubahan kembali ke lirik asli yang dikoreksi AI",
"resetAllChanges": "Kembalikan semua perubahan ke lirik asli yang telah dikoreksi",
"undo": "Urungkan",
"redo": "Ulangi",
"findReplace": "Cari/Ganti",
@@ -821,8 +827,8 @@
"audioLoadError": "Gagal memuat audio",
"audioStillLoading": "Audio masih dimuat...",
"loadingAudio": "Memuat audio...",
"autoCorrect": "Saran AI",
"autoCorrectDesc": "Buat saran koreksi AI dengan membandingkan transkripsi dengan lirik referensi. Tidak ada perubahan yang diterapkan sampai Anda menerima setiap saran."
"autoCorrect": "Koreksi otomatis",
"autoCorrectDesc": "Hasilkan saran koreksi dengan membandingkan transkripsi dengan lirik referensi. Tidak ada perubahan yang diterapkan sampai Anda menyetujui setiap saran."
},
"guidance": {
"showTips": "Tampilkan tips",
@@ -1294,18 +1300,18 @@
"category_other": "lainnya",
"category_repeated_chorus_fix": "korus",
"collapse": "Perkecil saran",
"confidenceHint": "Tingkat keyakinan AI yang diperlukan untuk menampilkan saran",
"confidenceHint": "Tingkat keyakinan minimum sebelum saran ditampilkan",
"confidenceLabel": "Filter saran",
"confidence_all": "Tampilkan semua",
"confidence_high": "Keyakinan tinggi",
"description": "AI membandingkan lirik hasil transkripsi dengan sumber referensi dan menyarankan perbaikan per kata. Anda dapat meninjau setiap saran — tidak ada perubahan yang diterapkan sampai Anda menerimanya.",
"description": "Koreksi otomatis membandingkan lirik yang ditranskripsi dengan sumber referensi dan menyarankan perbaikan per kata. Anda dapat meninjau setiap saran — tidak ada perubahan yang diterapkan sampai Anda menyetujuinya.",
"dismiss": "Abaikan saran",
"expand": "Perluas saran",
"insertMarker": "sisipkan:",
"insertionsHint": "Izinkan saran untuk menyisipkan kata yang terlewat dalam transkripsi",
"insertionsLabel": "Sarankan kata yang hilang",
"noReferences": "Tidak ada lirik referensi yang tersedia untuk lagu ini, sehingga saran AI tidak dapat dibuat. Tambahkan lirik dari panel referensi terlebih dahulu.",
"noSuggestions": "Tidak ada masalah yang ditemukan — AI tidak memiliki saran perubahan.",
"noReferences": "Tidak ada lirik referensi yang tersedia untuk lagu ini, sehingga saran tidak dapat dibuat. Tambahkan lirik dari panel referensi terlebih dahulu.",
"noSuggestions": "Tidak ada masalah yang ditemukan — tidak ada perubahan yang disarankan.",
"reject": "Tolak saran",
"rejectAll": "Tolak semua",
"rejected": "Ditolak",
@@ -1313,7 +1319,7 @@
"running": "Menganalisis lirik… biasanya memakan waktu 15–60 detik.",
"staleHint": "Kata-kata ini telah diedit sejak saran dibuat, sehingga saran ini tidak lagi berlaku.",
"summary": "{total} saran · {pending} tertunda · {accepted} diterima",
"title": "Saran koreksi AI",
"title": "Saran koreksi otomatis",
"undo": "Batalkan saran ini",
"cancel": "Batal",
"close": "Tutup",
@@ -1321,9 +1327,11 @@
"compareHint": "Lebih lambat dan lebih mahal, tapi menunjukkan saran mana yang disetujui oleh beberapa model",
"compareLabel": "Bandingkan beberapa model AI",
"conflictBadge": "varian",
"conflictTooltip": "Model memberikan hasil berbeda untuk kata-kata ini — menerima satu varian akan menolak varian lainnya.",
"conflictTooltip": "Ada beberapa saran berbeda untuk kata-kata ini — menerima satu varian akan mengabaikan varian lainnya.",
"consensusBadge": "{consensus}/{total} model",
"consensusTooltip": "Diusulkan oleh: {models}"
"consensusTooltip": "Diusulkan oleh: {models}",
"cachedBadge": "di-cache",
"cachedTooltip": "Dipulihkan dari proses sebelumnya untuk lirik yang sama — tidak ada biaya AI yang dikenakan."
}
},
"instrumentalReview": {
+19 -11
View File
@@ -780,7 +780,13 @@
"fadeIn": "Dissolvenza in entrata",
"fadeInSelection": "Dissolvenza in entrata sulla regione selezionata",
"fadeOut": "Dissolvenza in uscita",
"fadeOutSelection": "Dissolvenza in uscita sulla regione selezionata"
"fadeOutSelection": "Dissolvenza in uscita sulla regione selezionata",
"fadeInDisabledHint": "Per la dissolvenza in entrata, seleziona una regione che parta esattamente dall'inizio della traccia",
"fadeOutDisabledHint": "Per la dissolvenza in uscita, seleziona una regione che termini esattamente alla fine della traccia",
"trimEndDisabledHint": "Per tagliare la fine, seleziona una regione che termini esattamente alla fine della traccia",
"trimEndSelection": "Rimuovi tutto dopo la selezione",
"trimStartDisabledHint": "Per tagliare l'inizio, seleziona una regione che parta esattamente dall'inizio della traccia",
"trimStartSelection": "Rimuovi tutto prima della selezione"
},
"audioEditRestore": {
"title": "Sessioni di modifica audio salvate",
@@ -807,7 +813,7 @@
"acceptAll": "Accetta tutto",
"revertAll": "Ripristina tutto",
"undoAll": "Annulla tutto",
"resetAllChanges": "Reimposta tutte le modifiche al testo originale corretto dall'IA",
"resetAllChanges": "Annulla tutte le modifiche e torna al testo corretto originale",
"undo": "Annulla",
"redo": "Ripeti",
"findReplace": "Trova/Sostituisci",
@@ -821,8 +827,8 @@
"audioLoadError": "Impossibile caricare l'audio",
"audioStillLoading": "L'audio è ancora in caricamento...",
"loadingAudio": "Caricamento audio...",
"autoCorrect": "Suggerimenti IA",
"autoCorrectDesc": "Genera suggerimenti di correzione dell'IA confrontando la trascrizione con il testo di riferimento. Non verrà modificato nulla finché non accetterai i singoli suggerimenti."
"autoCorrect": "Correzione automatica",
"autoCorrectDesc": "Genera suggerimenti di correzione confrontando la trascrizione con il testo di riferimento. Non viene modificato nulla finché non accetti ogni suggerimento."
},
"guidance": {
"showTips": "Mostra suggerimenti",
@@ -1294,18 +1300,18 @@
"category_other": "altro",
"category_repeated_chorus_fix": "ritornello",
"collapse": "Comprimi suggerimenti",
"confidenceHint": "Quanto deve essere sicura l'IA prima di mostrare un suggerimento",
"confidenceHint": "Quanto deve essere attendibile un suggerimento prima di essere mostrato",
"confidenceLabel": "Filtro suggerimenti",
"confidence_all": "Mostra tutti",
"confidence_high": "Alta sicurezza",
"description": "L'IA confronta il testo trascritto con le fonti di riferimento e suggerisce correzioni parola per parola. Sei tu a controllare ogni suggerimento: non verrà applicato nulla finché non lo accetti.",
"description": "La correzione automatica confronta il testo trascritto con le fonti di riferimento e suggerisce correzioni a livello di singola parola. Puoi rivedere ogni suggerimento — non verrà applicato nulla finché non lo accetti.",
"dismiss": "Ignora suggerimenti",
"expand": "Espandi suggerimenti",
"insertMarker": "inserisci:",
"insertionsHint": "Consenti suggerimenti che inseriscono le parole omesse nella trascrizione",
"insertionsLabel": "Suggerisci parole mancanti",
"noReferences": "Non sono disponibili testi di riferimento per questa canzone, quindi non è possibile generare i suggerimenti dell'IA. Aggiungi prima un testo dal pannello dei riferimenti.",
"noSuggestions": "Nessun problema trovato: l'IA non ha modifiche da suggerire.",
"noReferences": "Non ci sono testi di riferimento disponibili per questa canzone, quindi non è possibile generare suggerimenti. Aggiungi prima il testo dal pannello di riferimento.",
"noSuggestions": "Nessun problema trovato — non ci sono modifiche suggerite.",
"reject": "Rifiuta suggerimento",
"rejectAll": "Rifiuta tutti",
"rejected": "Rifiutato",
@@ -1313,7 +1319,7 @@
"running": "Analisi del testo in corso… di solito richiede dai 15 ai 60 secondi.",
"staleHint": "Queste parole sono state modificate dopo la generazione dei suggerimenti, quindi questo suggerimento non è più valido.",
"summary": "{total} suggerimenti · {pending} in attesa · {accepted} accettati",
"title": "Suggerimenti di correzione dell'IA",
"title": "Suggerimenti di correzione automatica",
"undo": "Annulla questo suggerimento",
"cancel": "Annulla",
"close": "Chiudi",
@@ -1321,9 +1327,11 @@
"compareHint": "Più lento e costoso, ma mostra su quali suggerimenti concordano più modelli",
"compareLabel": "Confronta più modelli IA",
"conflictBadge": "variante",
"conflictTooltip": "I modelli non concordano su queste parole — accettare una variante esclude le altre.",
"conflictTooltip": "Ci sono diversi suggerimenti per queste parole — accettando una variante rifiuterai le altre.",
"consensusBadge": "{consensus}/{total} modelli",
"consensusTooltip": "Proposto da: {models}"
"consensusTooltip": "Proposto da: {models}",
"cachedBadge": "in cache",
"cachedTooltip": "Ripristinato da un'elaborazione precedente dello stesso testo — non ha comportato alcun costo per l'IA."
}
},
"instrumentalReview": {
+19 -11
View File
@@ -780,7 +780,13 @@
"fadeIn": "フェードイン",
"fadeInSelection": "選択した範囲をフェードイン",
"fadeOut": "フェードアウト",
"fadeOutSelection": "選択した範囲をフェードアウト"
"fadeOutSelection": "選択した範囲をフェードアウト",
"fadeInDisabledHint": "フェードインするには、トラックの先頭から始まる範囲を選択してください",
"fadeOutDisabledHint": "フェードアウトするには、トラックの末尾で終わる範囲を選択してください",
"trimEndDisabledHint": "末尾をトリミングするには、トラックの末尾で終わる範囲を選択してください",
"trimEndSelection": "選択範囲より後の部分をすべて削除します",
"trimStartDisabledHint": "先頭をトリミングするには、トラックの先頭から始まる範囲を選択してください",
"trimStartSelection": "選択範囲より前の部分をすべて削除します"
},
"audioEditRestore": {
"title": "保存されたオーディオ編集セッション",
@@ -807,7 +813,7 @@
"acceptAll": "すべて承認",
"revertAll": "すべて元に戻す",
"undoAll": "すべて取り消す",
"resetAllChanges": "すべての変更を元のAI修正済み歌詞にリセット",
"resetAllChanges": "すべての変更をリセットして、元の修正済み歌詞に戻す",
"undo": "元に戻す",
"redo": "やり直し",
"findReplace": "検索/置換",
@@ -821,8 +827,8 @@
"audioLoadError": "音声を読み込めませんでした",
"audioStillLoading": "音声はまだ読み込み中です...",
"loadingAudio": "音声を読み込み中...",
"autoCorrect": "AI提案",
"autoCorrectDesc": "文字起こしとリファレンス歌詞を比較して、AIが修正案を生成します。各提案を採用するまで、実際の歌詞が変更されることはありません。"
"autoCorrect": "自動補正",
"autoCorrectDesc": "文字起こしした歌詞と参照用の歌詞を比較して、修正の提案を生成します。各提案を承認するまで変更は適用されません。"
},
"guidance": {
"showTips": "ヒントを表示",
@@ -1294,18 +1300,18 @@
"category_other": "その他",
"category_repeated_chorus_fix": "コーラス",
"collapse": "提案を折りたたむ",
"confidenceHint": "AIがどの程度の確信度で提案を表示するかの基準です。",
"confidenceHint": "提案を表示するために必要な信頼度の基準",
"confidenceLabel": "提案フィルター",
"confidence_all": "すべて表示",
"confidence_high": "高い確信度",
"description": "AIが文字起こしされた歌詞とリファレンスを比較し、単語レベルで修正を提案します。すべての提案はご自身で確認でき、採用するまで実際の歌詞には反映されません。",
"description": "自動補正は、文字起こしした歌詞を参照用の歌詞と比較し、単語レベルで修正を提案します。すべての提案はご自身で確認でき、承認するまで適用されることはありません。",
"dismiss": "提案を非表示にする",
"expand": "提案を展開する",
"insertMarker": "挿入:",
"insertionsHint": "文字起こしで抜けている単語を追加する提案を表示します。",
"insertionsLabel": "不足している単語の追加を提案",
"noReferences": "この曲にはリファレンス歌詞がないため、AIの提案を生成できません。まずリファレンスパネルから歌詞を追加してください。",
"noSuggestions": "問題は見つかりませんでした。AIからの修正提案はありません。",
"noReferences": "この曲には参照用の歌詞がないため、提案を生成できません。まずは参照パネルから歌詞を追加してください。",
"noSuggestions": "問題は見つかりませんでした。修正の提案はありません。",
"reject": "提案を却下する",
"rejectAll": "すべて却下する",
"rejected": "却下済み",
@@ -1313,7 +1319,7 @@
"running": "歌詞を分析しています… 通常15〜60秒かかります。",
"staleHint": "提案の生成後に歌詞が編集されたため、この提案は無効になりました。",
"summary": "{total}件の提案 · 保留中 {pending}件 · 採用済み {accepted}件",
"title": "AI修正提案",
"title": "自動補正の提案",
"undo": "この提案を元に戻す",
"cancel": "キャンセル",
"close": "閉じる",
@@ -1321,9 +1327,11 @@
"compareHint": "時間とコストはかかりますが、複数のモデルで一致した提案を確認できます。",
"compareLabel": "複数のAIモデルを比較する",
"conflictBadge": "別案",
"conflictTooltip": "モデル間でこれらの単語の認識が異なります。1つの案を採用すると、他の案は破棄されます。",
"conflictTooltip": "これらの単語には複数の修正候補があります。1つの候補を承認すると、他の候補は破棄されます。",
"consensusBadge": "{consensus}/{total} モデル",
"consensusTooltip": "提案元: {models}"
"consensusTooltip": "提案元: {models}",
"cachedBadge": "キャッシュ済み",
"cachedTooltip": "同じ歌詞の過去のデータから復元されました。AIのコストは発生していません。"
}
},
"instrumentalReview": {
+19 -11
View File
@@ -780,7 +780,13 @@
"fadeIn": "페이드 인",
"fadeInSelection": "선택한 영역에 페이드 인 적용",
"fadeOut": "페이드 아웃",
"fadeOutSelection": "선택한 영역에 페이드 아웃 적용"
"fadeOutSelection": "선택한 영역에 페이드 아웃 적용",
"fadeInDisabledHint": "페이드 인을 적용하려면 트랙의 맨 처음부터 시작하는 영역을 선택하세요.",
"fadeOutDisabledHint": "페이드 아웃을 적용하려면 트랙의 맨 끝까지 이어지는 영역을 선택하세요.",
"trimEndDisabledHint": "끝부분을 자르려면 트랙의 맨 끝까지 이어지는 영역을 선택하세요.",
"trimEndSelection": "선택 영역 이후의 모든 구간 제거",
"trimStartDisabledHint": "시작 부분을 자르려면 트랙의 맨 처음부터 시작하는 영역을 선택하세요.",
"trimStartSelection": "선택 영역 이전의 모든 구간 제거"
},
"audioEditRestore": {
"title": "저장된 오디오 편집 세션",
@@ -807,7 +813,7 @@
"acceptAll": "모두 수락",
"revertAll": "모두 되돌리기",
"undoAll": "모두 실행 취소",
"resetAllChanges": "모든 변경 사항을 원래 AI가 수정한 가사로 초기화",
"resetAllChanges": "모든 변경 사항을 취소하고 원래 수정된 가사로 되돌립니다",
"undo": "실행 취소",
"redo": "다시 실행",
"findReplace": "찾기/바꾸기",
@@ -821,8 +827,8 @@
"audioLoadError": "오디오를 불러올 수 없습니다",
"audioStillLoading": "아직 오디오를 불러오는 중입니다...",
"loadingAudio": "오디오를 불러오는 중입니다...",
"autoCorrect": "AI 제안",
"autoCorrectDesc": "변환된 가사를 참조 가사와 비교하여 AI 수정 제안을 생성합니다. 각 제안을 수락하기 전까지는 아무것도 변경되지 않습니다."
"autoCorrect": "자동 수정",
"autoCorrectDesc": "추출된 가사를 참조 가사와 비교하여 수정 제안을 생성합니다. 각 제안을 수락하기 전까지는 아무것도 변경되지 않습니다."
},
"guidance": {
"showTips": "팁 표시",
@@ -1294,18 +1300,18 @@
"category_other": "기타",
"category_repeated_chorus_fix": "코러스",
"collapse": "제안 접기",
"confidenceHint": "제안을 표시하기 위한 AI의 확신도 기준",
"confidenceHint": "제안을 표시할 신뢰도 수준",
"confidenceLabel": "제안 필터",
"confidence_all": "모두 보기",
"confidence_high": "높은 확신도",
"description": "AI가 변환된 가사를 참조 소스와 비교하여 단어 수준의 수정을 제안합니다. 모든 제안을 검토할 수 있으며, 수락하기 전까지는 아무것도 적용되지 않습니다.",
"description": "자동 수정은 추출된 가사를 참조 소스와 비교하여 단어 단위로 수정 사항을 제안합니다. 모든 제안은 직접 검토하실 수 있으며, 수락하기 전까지는 아무것도 적용되지 않습니다.",
"dismiss": "제안 무시",
"expand": "제안 펼치기",
"insertMarker": "삽입:",
"insertionsHint": "변환 과정에서 누락된 단어를 삽입하는 제안 허용",
"insertionsLabel": "누락된 단어 제안",
"noReferences": "이 노래에 사용할 수 있는 참조 가사가 없어 AI 제안을 생성할 수 없습니다. 먼저 참조 패널에서 가사를 추가해 주세요.",
"noSuggestions": "발견된 문제 없음 — AI가 제안할 변경 사항이 없습니다.",
"noReferences": "이 노래에 대한 참조 가사가 없어 제안을 생성할 수 없습니다. 먼저 참조 패널에서 가사를 추가해 주세요.",
"noSuggestions": "발견된 문제가 없습니다 — 제안할 변경 사항이 없습니다.",
"reject": "제안 거부",
"rejectAll": "모두 거부",
"rejected": "거부됨",
@@ -1313,7 +1319,7 @@
"running": "가사 분석 중… 보통 15~60초 정도 걸립니다.",
"staleHint": "제안이 생성된 후 해당 단어가 수정되어 이 제안은 더 이상 유효하지 않습니다.",
"summary": "{total}개 제안 · {pending}개 대기 중 · {accepted}개 수락됨",
"title": "AI 수정 제안",
"title": "자동 수정 제안",
"undo": "이 제안 실행 취소",
"cancel": "취소",
"close": "닫기",
@@ -1321,9 +1327,11 @@
"compareHint": "시간과 비용이 더 들지만, 여러 모델이 공통으로 제안하는 내용을 확인할 수 있어요.",
"compareLabel": "여러 AI 모델 비교하기",
"conflictBadge": "다른 버전",
"conflictTooltip": "이 단어들에 대해 모델마다 제안이 달라요. 하나의 버전을 수락하면 나머지는 반영되지 않아요.",
"conflictTooltip": "이 단어들에 대해 여러 제안이 있습니다 — 하나를 수락하면 나머지는 적용되지 않습니다.",
"consensusBadge": "{consensus}/{total}개 모델",
"consensusTooltip": "제안한 모델: {models}"
"consensusTooltip": "제안한 모델: {models}",
"cachedBadge": "캐시됨",
"cachedTooltip": "동일한 가사로 진행한 이전 작업에서 복원되었습니다 — AI 비용이 발생하지 않았습니다."
}
},
"instrumentalReview": {
+19 -11
View File
@@ -780,7 +780,13 @@
"fadeIn": "Pudar Masuk",
"fadeInSelection": "Pudar masuk pada bahagian yang dipilih",
"fadeOut": "Pudar Keluar",
"fadeOutSelection": "Pudar keluar pada bahagian yang dipilih"
"fadeOutSelection": "Pudar keluar pada bahagian yang dipilih",
"fadeInDisabledHint": "Untuk fade in, pilih bahagian yang bermula tepat pada permulaan trek",
"fadeOutDisabledHint": "Untuk fade out, pilih bahagian yang berakhir tepat pada penghujung trek",
"trimEndDisabledHint": "Untuk memotong bahagian akhir, pilih bahagian yang berakhir tepat pada penghujung trek",
"trimEndSelection": "Buang semua bahagian selepas pilihan",
"trimStartDisabledHint": "Untuk memotong bahagian awal, pilih bahagian yang bermula tepat pada permulaan trek",
"trimStartSelection": "Buang semua bahagian sebelum pilihan"
},
"audioEditRestore": {
"title": "Sesi Suntingan Audio Disimpan",
@@ -807,7 +813,7 @@
"acceptAll": "Terima Semua",
"revertAll": "Kembalikan Semua",
"undoAll": "Buat Asal Semua",
"resetAllChanges": "Tetapkan semula semua perubahan kembali kepada lirik asal yang dibetulkan AI",
"resetAllChanges": "Tetapkan semula semua perubahan kepada lirik asal yang telah dibetulkan",
"undo": "Buat Asal",
"redo": "Buat Semula",
"findReplace": "Cari/Ganti",
@@ -821,8 +827,8 @@
"audioLoadError": "Tidak dapat memuatkan audio",
"audioStillLoading": "Audio masih dimuatkan...",
"loadingAudio": "Memuatkan audio...",
"autoCorrect": "Cadangan AI",
"autoCorrectDesc": "Jana cadangan pembetulan AI dengan membandingkan transkripsi dengan lirik rujukan. Tiada perubahan akan dibuat sehingga anda menerima setiap cadangan."
"autoCorrect": "Pembetulan automatik",
"autoCorrectDesc": "Jana cadangan pembetulan dengan membandingkan transkripsi dengan lirik rujukan. Tiada perubahan akan dibuat sehingga anda menerima setiap cadangan."
},
"guidance": {
"showTips": "Tunjukkan petua",
@@ -1294,18 +1300,18 @@
"category_other": "lain-lain",
"category_repeated_chorus_fix": "korus",
"collapse": "Tutup cadangan",
"confidenceHint": "Tahap keyakinan AI yang diperlukan untuk menunjukkan cadangan",
"confidenceHint": "Tahap keyakinan sesuatu cadangan sebelum ia dipaparkan",
"confidenceLabel": "Penapis cadangan",
"confidence_all": "Tunjukkan semua",
"confidence_high": "Keyakinan tinggi",
"description": "AI membandingkan lirik yang ditranskripsi dengan sumber rujukan dan mencadangkan pembetulan pada peringkat perkataan. Anda menyemak setiap cadangan — tiada perubahan akan dibuat sehingga anda menerimanya.",
"description": "Pembetulan automatik membandingkan lirik yang ditranskrip dengan sumber rujukan dan mencadangkan pembetulan pada peringkat perkataan. Anda boleh menyemak setiap cadangan — tiada perubahan akan dibuat sehingga anda menerimanya.",
"dismiss": "Abaikan cadangan",
"expand": "Kembangkan cadangan",
"insertMarker": "masukkan:",
"insertionsHint": "Benarkan cadangan yang memasukkan perkataan yang tertinggal dalam transkripsi",
"insertionsLabel": "Cadangkan perkataan yang tertinggal",
"noReferences": "Tiada lirik rujukan tersedia untuk lagu ini, jadi cadangan AI tidak dapat dijana. Tambahkan lirik dari panel rujukan terlebih dahulu.",
"noSuggestions": "Tiada isu ditemui — AI tiada cadangan perubahan.",
"noReferences": "Tiada lirik rujukan tersedia untuk lagu ini, jadi cadangan tidak dapat dijana. Tambahkan lirik dari panel rujukan terlebih dahulu.",
"noSuggestions": "Tiada isu ditemui — tiada perubahan yang dicadangkan.",
"reject": "Tolak cadangan",
"rejectAll": "Tolak semua",
"rejected": "Ditolak",
@@ -1313,7 +1319,7 @@
"running": "Menganalisis lirik… ini biasanya mengambil masa 15–60 saat.",
"staleHint": "Perkataan ini telah diedit sejak cadangan dijana, jadi cadangan ini tidak lagi terpakai.",
"summary": "{total} cadangan · {pending} belum selesai · {accepted} diterima",
"title": "Cadangan pembetulan AI",
"title": "Cadangan pembetulan automatik",
"undo": "Buat asal cadangan ini",
"cancel": "Batal",
"close": "Tutup",
@@ -1321,9 +1327,11 @@
"compareHint": "Lebih perlahan dan kos lebih tinggi, tetapi menunjukkan cadangan yang dipersetujui oleh berbilang model",
"compareLabel": "Bandingkan berbilang model AI",
"conflictBadge": "varian",
"conflictTooltip": "Model tidak bersetuju tentang perkataan ini — menerima satu varian akan menolak varian yang lain.",
"conflictTooltip": "Terdapat cadangan yang berbeza untuk perkataan ini — menerima satu varian akan menolak yang lain.",
"consensusBadge": "{consensus}/{total} model",
"consensusTooltip": "Dicadangkan oleh: {models}"
"consensusTooltip": "Dicadangkan oleh: {models}",
"cachedBadge": "dicache",
"cachedTooltip": "Dipulihkan daripada proses sebelumnya untuk lirik yang sama — tiada kos AI dikenakan."
}
},
"instrumentalReview": {
+19 -11
View File
@@ -780,7 +780,13 @@
"fadeIn": "Ton inn",
"fadeInSelection": "Ton inn over det valgte området",
"fadeOut": "Ton ut",
"fadeOutSelection": "Ton ut over det valgte området"
"fadeOutSelection": "Ton ut over det valgte området",
"fadeInDisabledHint": "For å tone inn, velg et område som starter helt i begynnelsen av sporet",
"fadeOutDisabledHint": "For å tone ut, velg et område som går helt til slutten av sporet",
"trimEndDisabledHint": "For å trimme slutten, velg et område som går helt til slutten av sporet",
"trimEndSelection": "Fjern alt etter markeringen",
"trimStartDisabledHint": "For å trimme starten, velg et område som starter helt i begynnelsen av sporet",
"trimStartSelection": "Fjern alt før markeringen"
},
"audioEditRestore": {
"title": "Lagrede lydredigeringsøkter",
@@ -807,7 +813,7 @@
"acceptAll": "Godta alle",
"revertAll": "Tilbakestill alle",
"undoAll": "Angre alle",
"resetAllChanges": "Tilbakestill alle endringer til den originale AI-korrigerte teksten",
"resetAllChanges": "Tilbakestill alle endringer til den opprinnelige korrigerte teksten",
"undo": "Angre",
"redo": "Gjør om",
"findReplace": "Finn/Erstatt",
@@ -821,8 +827,8 @@
"audioLoadError": "Kunne ikke laste inn lyd",
"audioStillLoading": "Lyden laster fortsatt inn...",
"loadingAudio": "Laster inn lyd...",
"autoCorrect": "AI-forslag",
"autoCorrectDesc": "Generer AI-korrigeringsforslag ved å sammenligne transkripsjonen med referanseteksten. Ingenting endres før du godtar hvert forslag."
"autoCorrect": "Autokorrektur",
"autoCorrectDesc": "Generer forslag til rettelser ved å sammenligne transkripsjonen med referanseteksten. Ingenting endres før du godtar hvert forslag."
},
"guidance": {
"showTips": "Vis tips",
@@ -1294,18 +1300,18 @@
"category_other": "annet",
"category_repeated_chorus_fix": "refreng",
"collapse": "Skjul forslag",
"confidenceHint": "Hvor sikker AI-en må være for å vise et forslag",
"confidenceHint": "Hvor sikkert et forslag må være før det vises",
"confidenceLabel": "Forslagsfilter",
"confidence_all": "Vis alle",
"confidence_high": "Høy sikkerhet",
"description": "AI-en sammenligner den transkriberte teksten med referansekildene og foreslår rettelser på ordnivå. Du går gjennom hvert forslag — ingenting blir endret før du godtar det.",
"description": "Autokorrektur sammenligner den transkriberte teksten med referansekildene og foreslår rettelser på ordnivå. Du går gjennom hvert forslag — ingenting tas i bruk før du godtar det.",
"dismiss": "Lukk forslag",
"expand": "Utvid forslag",
"insertMarker": "sett inn:",
"insertionsHint": "Tillat forslag som setter inn ord som mangler i transkripsjonen",
"insertionsLabel": "Foreslå manglende ord",
"noReferences": "Ingen referansetekster er tilgjengelige for denne sangen, så AI-forslag kan ikke genereres. Legg til tekst fra referansepanelet først.",
"noSuggestions": "Ingen problemer funnet — AI-en har ingen foreslåtte endringer.",
"noReferences": "Ingen referansetekst er tilgjengelig for denne sangen, så det kan ikke genereres forslag. Legg til tekst fra referansepanelet først.",
"noSuggestions": "Ingen problemer funnet — det er ingen foreslåtte endringer.",
"reject": "Avvis forslag",
"rejectAll": "Avvis alle",
"rejected": "Avvist",
@@ -1313,7 +1319,7 @@
"running": "Analyserer tekst… dette tar vanligvis 15–60 sekunder.",
"staleHint": "Disse ordene ble redigert etter at forslagene ble generert, så dette forslaget gjelder ikke lenger.",
"summary": "{total} forslag · {pending} ventende · {accepted} godtatt",
"title": "AI-korrigeringsforslag",
"title": "Forslag til autokorrektur",
"undo": "Angre dette forslaget",
"cancel": "Avbryt",
"close": "Lukk",
@@ -1321,9 +1327,11 @@
"compareHint": "Tar lengre tid og koster mer, men viser hvilke forslag flere modeller er enige om",
"compareLabel": "Sammenlign flere AI-modeller",
"conflictBadge": "variant",
"conflictTooltip": "Modellene er uenige om disse ordene — hvis du godtar én variant, avvises de andre.",
"conflictTooltip": "Det finnes forskjellige forslag for disse ordene — hvis du godtar én variant, avvises de andre.",
"consensusBadge": "{consensus}/{total} modeller",
"consensusTooltip": "Foreslått av: {models}"
"consensusTooltip": "Foreslått av: {models}",
"cachedBadge": "bufret",
"cachedTooltip": "Hentet fra en tidligere kjøring på samme sangtekst — det påløp ingen AI-kostnader."
}
},
"instrumentalReview": {
+19 -11
View File
@@ -780,7 +780,13 @@
"fadeIn": "Fade-in",
"fadeInSelection": "Fade-in over het geselecteerde gedeelte",
"fadeOut": "Fade-out",
"fadeOutSelection": "Fade-out over het geselecteerde gedeelte"
"fadeOutSelection": "Fade-out over het geselecteerde gedeelte",
"fadeInDisabledHint": "Om in te faden, selecteer je een gedeelte dat helemaal aan het begin van de track begint",
"fadeOutDisabledHint": "Om uit te faden, selecteer je een gedeelte dat helemaal aan het einde van de track eindigt",
"trimEndDisabledHint": "Om het einde bij te knippen, selecteer je een gedeelte dat helemaal aan het einde van de track eindigt",
"trimEndSelection": "Verwijder alles na de selectie",
"trimStartDisabledHint": "Om het begin bij te knippen, selecteer je een gedeelte dat helemaal aan het begin van de track begint",
"trimStartSelection": "Verwijder alles voor de selectie"
},
"audioEditRestore": {
"title": "Opgeslagen Audio Bewerkingssessies",
@@ -807,7 +813,7 @@
"acceptAll": "Accepteer alles",
"revertAll": "Draai alles terug",
"undoAll": "Maak alles ongedaan",
"resetAllChanges": "Reset alle wijzigingen terug naar de originele AI-gecorrigeerde songteksten",
"resetAllChanges": "Zet alle wijzigingen terug naar de oorspronkelijke gecorrigeerde songtekst",
"undo": "Ongedaan maken",
"redo": "Opnieuw uitvoeren",
"findReplace": "Zoeken/Vervangen",
@@ -821,8 +827,8 @@
"audioLoadError": "Kon audio niet laden",
"audioStillLoading": "Audio is nog aan het laden...",
"loadingAudio": "Audio laden...",
"autoCorrect": "AI-suggesties",
"autoCorrectDesc": "Genereer AI-correctiesuggesties door de transcriptie te vergelijken met de referentiesongtekst. Er wordt niets gewijzigd totdat je elke suggestie accepteert."
"autoCorrect": "Autocorrectie",
"autoCorrectDesc": "Genereer correctiesuggesties door de transcriptie te vergelijken met de referentiesongtekst. Er wordt niets gewijzigd totdat je elke suggestie accepteert."
},
"guidance": {
"showTips": "Toon tips",
@@ -1294,18 +1300,18 @@
"category_other": "overig",
"category_repeated_chorus_fix": "refrein",
"collapse": "Suggesties inklappen",
"confidenceHint": "Hoe zeker de AI moet zijn om een suggestie te tonen",
"confidenceHint": "Hoe zeker een suggestie moet zijn voordat deze wordt getoond",
"confidenceLabel": "Suggestiefilter",
"confidence_all": "Toon alles",
"confidence_high": "Hoge zekerheid",
"description": "De AI vergelijkt de getranscribeerde songtekst met de referentiebronnen en stelt correcties op woordniveau voor. Je beoordeelt elke suggestie — er wordt niets toegepast totdat je deze accepteert.",
"description": "Autocorrectie vergelijkt de getranscribeerde songtekst met de referentiebronnen en stelt correcties op woordniveau voor. Je beoordeelt elke suggestie — er wordt niets toegepast totdat je deze accepteert.",
"dismiss": "Suggesties negeren",
"expand": "Suggesties uitklappen",
"insertMarker": "invoegen:",
"insertionsHint": "Sta suggesties toe die woorden invoegen die in de transcriptie ontbreken",
"insertionsLabel": "Stel ontbrekende woorden voor",
"noReferences": "Er is geen referentiesongtekst beschikbaar voor dit nummer, dus er kunnen geen AI-suggesties worden gegenereerd. Voeg eerst een songtekst toe via het referentiepaneel.",
"noSuggestions": "Geen problemen gevonden — de AI heeft geen wijzigingen voorgesteld.",
"noReferences": "Er is geen referentiesongtekst beschikbaar voor dit nummer, dus er kunnen geen suggesties worden gegenereerd. Voeg eerst een songtekst toe via het referentiepaneel.",
"noSuggestions": "Geen problemen gevonden — er zijn geen voorgestelde wijzigingen.",
"reject": "Wijs suggestie af",
"rejectAll": "Wijs alles af",
"rejected": "Afgewezen",
@@ -1313,7 +1319,7 @@
"running": "Songtekst analyseren… dit duurt meestal 15–60 seconden.",
"staleHint": "Deze woorden zijn bewerkt nadat de suggesties zijn gegenereerd, dus deze suggestie is niet meer van toepassing.",
"summary": "{total} suggesties · {pending} in afwachting · {accepted} geaccepteerd",
"title": "AI-correctiesuggesties",
"title": "Suggesties voor autocorrectie",
"undo": "Maak deze suggestie ongedaan",
"cancel": "Annuleren",
"close": "Sluiten",
@@ -1321,9 +1327,11 @@
"compareHint": "Langzamer en kost meer, maar laat zien over welke suggesties meerdere modellen het eens zijn",
"compareLabel": "Vergelijk meerdere AI-modellen",
"conflictBadge": "variant",
"conflictTooltip": "De modellen zijn het niet eens over deze woorden — als je één variant accepteert, wijs je de andere af.",
"conflictTooltip": "Er zijn verschillende suggesties voor deze woorden — als je één variant accepteert, worden de andere afgewezen.",
"consensusBadge": "{consensus}/{total} modellen",
"consensusTooltip": "Voorgesteld door: {models}"
"consensusTooltip": "Voorgesteld door: {models}",
"cachedBadge": "gecached",
"cachedTooltip": "Hersteld uit een eerdere verwerking van dezelfde songtekst — er zijn geen AI-kosten gemaakt."
}
},
"instrumentalReview": {
+19 -11
View File
@@ -780,7 +780,13 @@
"fadeIn": "Płynne pogłaśnianie",
"fadeInSelection": "Płynnie pogłośnij zaznaczony fragment",
"fadeOut": "Płynne wyciszanie",
"fadeOutSelection": "Płynnie wycisz zaznaczony fragment"
"fadeOutSelection": "Płynnie wycisz zaznaczony fragment",
"fadeInDisabledHint": "Aby płynnie zgłośnić, zaznacz fragment, który zaczyna się na samym początku utworu",
"fadeOutDisabledHint": "Aby płynnie wyciszyć, zaznacz fragment, który kończy się na samym końcu utworu",
"trimEndDisabledHint": "Aby przyciąć koniec, zaznacz fragment, który kończy się na samym końcu utworu",
"trimEndSelection": "Usuń wszystko po zaznaczeniu",
"trimStartDisabledHint": "Aby przyciąć początek, zaznacz fragment, który zaczyna się na samym początku utworu",
"trimStartSelection": "Usuń wszystko przed zaznaczeniem"
},
"audioEditRestore": {
"title": "Zapisane sesje edycji dźwięku",
@@ -807,7 +813,7 @@
"acceptAll": "Akceptuj wszystko",
"revertAll": "Cofnij wszystko",
"undoAll": "Cofnij wszystko",
"resetAllChanges": "Zresetuj wszystkie zmiany z powrotem do oryginalnego tekstu poprawionego przez AI",
"resetAllChanges": "Cofnij wszystkie zmiany i przywróć oryginalny, poprawiony tekst",
"undo": "Cofnij",
"redo": "Ponów",
"findReplace": "Znajdź/Zamień",
@@ -821,8 +827,8 @@
"audioLoadError": "Nie udało się załadować audio",
"audioStillLoading": "Audio wciąż się ładuje...",
"loadingAudio": "Ładowanie audio...",
"autoCorrect": "Sugestie AI",
"autoCorrectDesc": "Generuj sugestie poprawek AI, porównując transkrypcję z tekstem referencyjnym. Nic nie zostanie zmienione, dopóki nie zaakceptujesz każdej sugestii."
"autoCorrect": "Autokorekta",
"autoCorrectDesc": "Wygeneruj sugestie poprawek, porównując transkrypcję z tekstem referencyjnym. Żadna zmiana nie zostanie wprowadzona, dopóki jej nie zaakceptujesz."
},
"guidance": {
"showTips": "Pokaż wskazówki",
@@ -1294,18 +1300,18 @@
"category_other": "inne",
"category_repeated_chorus_fix": "refren",
"collapse": "Zwiń sugestie",
"confidenceHint": "Jak pewne musi być AI, aby pokazać sugestię",
"confidenceHint": "Wymagany poziom pewności, aby wyświetlić sugestię",
"confidenceLabel": "Filtr sugestii",
"confidence_all": "Pokaż wszystkie",
"confidence_high": "Wysoka pewność",
"description": "AI porównuje transkrybowany tekst ze źródłami referencyjnymi i sugeruje poprawki na poziomie słów. Przeglądasz każdą sugestię — nic nie zostanie zmienione, dopóki jej nie zaakceptujesz.",
"description": "Autokorekta porównuje tekst z transkrypcji ze źródłami referencyjnymi i sugeruje poprawki poszczególnych słów. Samodzielnie przeglądasz każdą sugestię — żadna zmiana nie zostanie wprowadzona, dopóki jej nie zaakceptujesz.",
"dismiss": "Odrzuć sugestie",
"expand": "Rozwiń sugestie",
"insertMarker": "wstaw:",
"insertionsHint": "Zezwalaj na sugestie wstawiające słowa, które pominięto w transkrypcji",
"insertionsLabel": "Sugeruj brakujące słowa",
"noReferences": "Dla tej piosenki nie ma dostępnego tekstu referencyjnego, więc nie można wygenerować sugestii AI. Najpierw dodaj tekst w panelu referencyjnym.",
"noSuggestions": "Nie znaleziono problemów — AI nie ma sugerowanych zmian.",
"noReferences": "Dla tego utworu brakuje tekstów referencyjnych, dlatego nie można wygenerować sugestii. Najpierw dodaj tekst w panelu referencyjnym.",
"noSuggestions": "Nie znaleziono problemów — brak sugerowanych zmian.",
"reject": "Odrzuć sugestię",
"rejectAll": "Odrzuć wszystkie",
"rejected": "Odrzucone",
@@ -1313,7 +1319,7 @@
"running": "Analizowanie tekstu… zazwyczaj zajmuje to 15–60 sekund.",
"staleHint": "Te słowa zostały edytowane od czasu wygenerowania sugestii, więc ta sugestia nie ma już zastosowania.",
"summary": "{total} sugestii · {pending} oczekujących · {accepted} zaakceptowanych",
"title": "Sugestie poprawek AI",
"title": "Sugestie autokorekty",
"undo": "Cofnij tę sugestię",
"cancel": "Anuluj",
"close": "Zamknij",
@@ -1321,9 +1327,11 @@
"compareHint": "Działa wolniej i kosztuje więcej, ale pokazuje, co do których sugestii zgadza się kilka modeli",
"compareLabel": "Porównaj kilka modeli AI",
"conflictBadge": "wariant",
"conflictTooltip": "Modele nie są zgodne co do tych słów — zaakceptowanie jednego wariantu odrzuca pozostałe.",
"conflictTooltip": "Dla tych słów dostępne są różne sugestie — zaakceptowanie jednego wariantu odrzuca pozostałe.",
"consensusBadge": "{consensus}/{total} modeli",
"consensusTooltip": "Zaproponowane przez: {models}"
"consensusTooltip": "Zaproponowane przez: {models}",
"cachedBadge": "zbuforowane",
"cachedTooltip": "Przywrócono z poprzedniego przetworzenia tego samego tekstu — nie poniesiono kosztów AI."
}
},
"instrumentalReview": {
+19 -11
View File
@@ -780,7 +780,13 @@
"fadeIn": "Fade In",
"fadeInSelection": "Aplicar fade in na região selecionada",
"fadeOut": "Fade Out",
"fadeOutSelection": "Aplicar fade out na região selecionada"
"fadeOutSelection": "Aplicar fade out na região selecionada",
"fadeInDisabledHint": "Para aplicar fade in, selecione uma região que comece bem no início da faixa",
"fadeOutDisabledHint": "Para aplicar fade out, selecione uma região que termine bem no final da faixa",
"trimEndDisabledHint": "Para cortar o final, selecione uma região que termine bem no final da faixa",
"trimEndSelection": "Remover tudo após a seleção",
"trimStartDisabledHint": "Para cortar o início, selecione uma região que comece bem no início da faixa",
"trimStartSelection": "Remover tudo antes da seleção"
},
"audioEditRestore": {
"title": "Sessões de Edição de Áudio Salvas",
@@ -807,7 +813,7 @@
"acceptAll": "Aceitar Tudo",
"revertAll": "Reverter Tudo",
"undoAll": "Desfazer Tudo",
"resetAllChanges": "Redefinir todas as alterações de volta para as letras originais corrigidas por IA",
"resetAllChanges": "Redefinir todas as alterações para a letra original corrigida",
"undo": "Desfazer",
"redo": "Refazer",
"findReplace": "Localizar/Substituir",
@@ -821,8 +827,8 @@
"audioLoadError": "Não foi possível carregar o áudio",
"audioStillLoading": "O áudio ainda está carregando...",
"loadingAudio": "Carregando áudio...",
"autoCorrect": "Sugestões da IA",
"autoCorrectDesc": "Gere sugestões de correção da IA comparando a transcrição com a letra de referência. Nada é alterado até que você aceite cada sugestão."
"autoCorrect": "Autocorreção",
"autoCorrectDesc": "Gere sugestões de correção comparando a transcrição com a letra de referência. Nada é alterado até que você aceite cada sugestão."
},
"guidance": {
"showTips": "Mostrar dicas",
@@ -1294,18 +1300,18 @@
"category_other": "outro",
"category_repeated_chorus_fix": "refrão",
"collapse": "Recolher sugestões",
"confidenceHint": "O nível de confiança que a IA deve ter para mostrar uma sugestão",
"confidenceHint": "Nível de confiança necessário para que uma sugestão seja exibida",
"confidenceLabel": "Filtro de sugestões",
"confidence_all": "Mostrar todas",
"confidence_high": "Alta confiança",
"description": "A IA compara a letra transcrita com as fontes de referência e sugere correções palavra por palavra. Você revisa cada sugestão — nada é aplicado até que você aceite.",
"description": "A autocorreção compara a letra transcrita com as fontes de referência e sugere correções palavra por palavra. Você revisa cada sugestão — nada é aplicado até que você aceite.",
"dismiss": "Descartar sugestões",
"expand": "Expandir sugestões",
"insertMarker": "inserir:",
"insertionsHint": "Permitir sugestões que insiram palavras que faltaram na transcrição",
"insertionsLabel": "Sugerir palavras ausentes",
"noReferences": "Não há letras de referência disponíveis para esta música, portanto, não é possível gerar sugestões da IA. Adicione a letra no painel de referência primeiro.",
"noSuggestions": "Nenhum problema encontrado — a IA não tem alterações sugeridas.",
"noReferences": "Não há letras de referência disponíveis para esta música, então não é possível gerar sugestões. Primeiro, adicione a letra no painel de referência.",
"noSuggestions": "Nenhum problema encontrado — não há alterações sugeridas.",
"reject": "Rejeitar sugestão",
"rejectAll": "Rejeitar todas",
"rejected": "Rejeitada",
@@ -1313,7 +1319,7 @@
"running": "Analisando a letra… isso geralmente leva de 15 a 60 segundos.",
"staleHint": "Estas palavras foram editadas desde que as sugestões foram geradas, então esta sugestão não se aplica mais.",
"summary": "{total} sugestões · {pending} pendentes · {accepted} aceitas",
"title": "Sugestões de correção da IA",
"title": "Sugestões de autocorreção",
"undo": "Desfazer esta sugestão",
"cancel": "Cancelar",
"close": "Fechar",
@@ -1321,9 +1327,11 @@
"compareHint": "Mais lento e mais caro, mas mostra em quais sugestões vários modelos concordam",
"compareLabel": "Comparar vários modelos de IA",
"conflictBadge": "variante",
"conflictTooltip": "Os modelos discordam sobre estas palavras — aceitar uma variante rejeita as outras.",
"conflictTooltip": "Há sugestões diferentes para estas palavras — aceitar uma variante rejeita as outras.",
"consensusBadge": "{consensus}/{total} modelos",
"consensusTooltip": "Proposto por: {models}"
"consensusTooltip": "Proposto por: {models}",
"cachedBadge": "em cache",
"cachedTooltip": "Restaurado de uma execução anterior da mesma letra — nenhum custo de IA foi gerado."
}
},
"instrumentalReview": {
+19 -11
View File
@@ -780,7 +780,13 @@
"fadeIn": "Fade In",
"fadeInSelection": "Aplică fade in pe regiunea selectată",
"fadeOut": "Fade Out",
"fadeOutSelection": "Aplică fade out pe regiunea selectată"
"fadeOutSelection": "Aplică fade out pe regiunea selectată",
"fadeInDisabledHint": "Pentru fade in, selectează o regiune care începe chiar de la începutul piesei",
"fadeOutDisabledHint": "Pentru fade out, selectează o regiune care se termină chiar la sfârșitul piesei",
"trimEndDisabledHint": "Pentru a tăia sfârșitul, selectează o regiune care se termină chiar la sfârșitul piesei",
"trimEndSelection": "Elimină totul de după selecție",
"trimStartDisabledHint": "Pentru a tăia începutul, selectează o regiune care începe chiar de la începutul piesei",
"trimStartSelection": "Elimină totul dinaintea selecției"
},
"audioEditRestore": {
"title": "Sesiuni de editare audio salvate",
@@ -807,7 +813,7 @@
"acceptAll": "Acceptă tot",
"revertAll": "Revino la tot",
"undoAll": "Anulează tot",
"resetAllChanges": "Resetează toate modificările înapoi la versurile originale corectate de AI",
"resetAllChanges": "Resetează toate modificările la versurile corectate inițial",
"undo": "Anulează",
"redo": "Refă",
"findReplace": "Caută/Înlocuiește",
@@ -821,8 +827,8 @@
"audioLoadError": "Nu s-a putut încărca fișierul audio",
"audioStillLoading": "Fișierul audio încă se încarcă...",
"loadingAudio": "Se încarcă fișierul audio...",
"autoCorrect": "Sugestii AI",
"autoCorrectDesc": "Generează sugestii de corectare AI comparând transcrierea cu versurile de referință. Nimic nu se modifică până nu accepți fiecare sugestie."
"autoCorrect": "Autocorectare",
"autoCorrectDesc": "Generează sugestii de corectare comparând transcrierea cu versurile de referință. Nimic nu este modificat până când nu accepți fiecare sugestie."
},
"guidance": {
"showTips": "Arată sfaturi",
@@ -1294,18 +1300,18 @@
"category_other": "altele",
"category_repeated_chorus_fix": "refren",
"collapse": "Restrânge sugestiile",
"confidenceHint": "Cât de sigur trebuie să fie AI-ul pentru a afișa o sugestie",
"confidenceHint": "Cât de sigură trebuie să fie o sugestie înainte de a fi afișată",
"confidenceLabel": "Filtru de sugestii",
"confidence_all": "Afișează toate",
"confidence_high": "Încredere ridicată",
"description": "AI-ul compară versurile transcrise cu sursele de referință și sugerează corecturi la nivel de cuvânt. Tu revizuiești fiecare sugestie — nimic nu se aplică până nu o accepți.",
"description": "Autocorectarea compară versurile transcrise cu sursele de referință și sugerează corecturi la nivel de cuvânt. Tu revizuiești fiecare sugestie — nimic nu este aplicat până nu o accepți.",
"dismiss": "Ignoră sugestiile",
"expand": "Extinde sugestiile",
"insertMarker": "inserează:",
"insertionsHint": "Permite sugestii care inserează cuvinte pe care transcrierea le-a omis",
"insertionsLabel": "Sugerează cuvintele lipsă",
"noReferences": "Nu sunt disponibile versuri de referință pentru această melodie, așa că sugestiile AI nu pot fi generate. Adaugă mai întâi versuri din panoul de referință.",
"noSuggestions": "Nu s-au găsit probleme — AI-ul nu are modificări sugerate.",
"noReferences": "Nu există versuri de referință disponibile pentru această melodie, așa că nu pot fi generate sugestii. Adaugă mai întâi versuri din panoul de referință.",
"noSuggestions": "Nu s-au găsit probleme — nu există modificări sugerate.",
"reject": "Respinge sugestia",
"rejectAll": "Respinge toate",
"rejected": "Respins",
@@ -1313,7 +1319,7 @@
"running": "Se analizează versurile… de obicei durează 15–60 de secunde.",
"staleHint": "Aceste cuvinte au fost editate după generarea sugestiilor, așa că această sugestie nu se mai aplică.",
"summary": "{total} sugestii · {pending} în așteptare · {accepted} acceptate",
"title": "Sugestii de corectare AI",
"title": "Sugestii de autocorectare",
"undo": "Anulează această sugestie",
"cancel": "Anulează",
"close": "Închide",
@@ -1321,9 +1327,11 @@
"compareHint": "Mai lent și costă mai mult, dar îți arată cu ce sugestii sunt de acord mai multe modele",
"compareLabel": "Compară mai multe modele AI",
"conflictBadge": "variantă",
"conflictTooltip": "Modelele au variante diferite pentru aceste cuvinte — dacă accepți o variantă, le respingi pe celelalte.",
"conflictTooltip": "Există sugestii diferite pentru aceste cuvinte — acceptarea unei variante le respinge pe celelalte.",
"consensusBadge": "{consensus}/{total} modele",
"consensusTooltip": "Propus de: {models}"
"consensusTooltip": "Propus de: {models}",
"cachedBadge": "din cache",
"cachedTooltip": "Restaurat dintr-o rulare anterioară pentru aceleași versuri — nu a generat niciun cost AI."
}
},
"instrumentalReview": {
+19 -11
View File
@@ -780,7 +780,13 @@
"fadeIn": "Плавное нарастание",
"fadeInSelection": "Плавное нарастание в выделенной области",
"fadeOut": "Плавное затухание",
"fadeOutSelection": "Плавное затухание в выделенной области"
"fadeOutSelection": "Плавное затухание в выделенной области",
"fadeInDisabledHint": "Для плавного нарастания звука выбери область, которая начинается в самом начале трека",
"fadeOutDisabledHint": "Для плавного затухания звука выбери область, которая заканчивается в самом конце трека",
"trimEndDisabledHint": "Чтобы обрезать конец, выбери область, которая заканчивается в самом конце трека",
"trimEndSelection": "Удалить всё после выделения",
"trimStartDisabledHint": "Чтобы обрезать начало, выбери область, которая начинается в самом начале трека",
"trimStartSelection": "Удалить всё до выделения"
},
"audioEditRestore": {
"title": "Сохраненные сессии редактирования аудио",
@@ -807,7 +813,7 @@
"acceptAll": "Принять все",
"revertAll": "Отменить все",
"undoAll": "Отменить все действия",
"resetAllChanges": "Сбросить все изменения до оригинального текста, исправленного ИИ",
"resetAllChanges": "Сбросить все изменения и вернуть исходный исправленный текст",
"undo": "Отменить",
"redo": "Повторить",
"findReplace": "Найти/Заменить",
@@ -821,8 +827,8 @@
"audioLoadError": "Не удалось загрузить аудио",
"audioStillLoading": "Аудио всё ещё загружается...",
"loadingAudio": "Загрузка аудио...",
"autoCorrect": "Правки от ИИ",
"autoCorrectDesc": "Получи от ИИ предложенные правки на основе сравнения распознанного текста с эталонным. Ничего не изменится, пока ты не примешь каждую из них."
"autoCorrect": "Автоисправление",
"autoCorrectDesc": "Сгенерируй варианты исправлений, сравнив распознанный текст с эталонным. Ничего не изменится, пока ты не примешь каждый вариант."
},
"guidance": {
"showTips": "Показать советы",
@@ -1294,18 +1300,18 @@
"category_other": "другое",
"category_repeated_chorus_fix": "припев",
"collapse": "Свернуть правки",
"confidenceHint": "Насколько ИИ должен быть уверен, чтобы предложить правку",
"confidenceHint": "Насколько точным должен быть предложенный вариант, чтобы он отобразился",
"confidenceLabel": "Фильтр правок",
"confidence_all": "Показать все",
"confidence_high": "Высокая уверенность",
"description": "ИИ сравнивает распознанный текст с эталонными источниками и предлагает исправления отдельных слов. Ты проверяешь каждую правку — ничего не изменится, пока ты её не примешь.",
"description": "Автоисправление сравнивает распознанный текст с эталонными источниками и предлагает исправления отдельных слов. Ты проверяешь каждый вариант — ничего не изменится, пока ты его не примешь.",
"dismiss": "Скрыть правки",
"expand": "Развернуть правки",
"insertMarker": "вставить:",
"insertionsHint": "Предлагать добавление слов, пропущенных при распознавании",
"insertionsLabel": "Предлагать пропущенные слова",
"noReferences": "Для этой песни нет эталонного текста, поэтому ИИ не может предложить исправления. Сначала добавь текст на панели эталонов.",
"noSuggestions": "Проблем не найдено — ИИ не предлагает никаких правок.",
"noReferences": "Для этой песни нет эталонного текста, поэтому мы не можем сгенерировать исправления. Сначала добавь текст на панели эталонов.",
"noSuggestions": "Ошибок не найдено — нет предложенных изменений.",
"reject": "Отклонить правку",
"rejectAll": "Отклонить все",
"rejected": "Отклонено",
@@ -1313,7 +1319,7 @@
"running": "Анализ текста… обычно это занимает 15–60 секунд.",
"staleHint": "Эти слова были изменены после запуска проверки, поэтому данная правка больше не актуальна.",
"summary": "{total} правок · {pending} в ожидании · {accepted} принято",
"title": "Исправления от ИИ",
"title": "Варианты автоисправления",
"undo": "Отменить эту правку",
"cancel": "Отмена",
"close": "Закрыть",
@@ -1321,9 +1327,11 @@
"compareHint": "Медленнее и стоит дороже, но показывает, в каких вариантах сходятся несколько моделей",
"compareLabel": "Сравнить несколько ИИ-моделей",
"conflictBadge": "вариант",
"conflictTooltip": "Модели расходятся во мнении насчет этих слов — приняв один вариант, ты отклонишь остальные.",
"conflictTooltip": "Для этих слов есть разные варианты — если принять один, остальные будут отклонены.",
"consensusBadge": "{consensus}/{total} моделей",
"consensusTooltip": "Предложено: {models}"
"consensusTooltip": "Предложено: {models}",
"cachedBadge": "кэшировано",
"cachedTooltip": "Восстановлено из предыдущей обработки этого же текста песни — без затрат на ИИ."
}
},
"instrumentalReview": {
+19 -11
View File
@@ -780,7 +780,13 @@
"fadeIn": "Postupné zosilnenie",
"fadeInSelection": "Postupné zosilnenie vo vybranej oblasti",
"fadeOut": "Postupné stíšenie",
"fadeOutSelection": "Postupné stíšenie vo vybranej oblasti"
"fadeOutSelection": "Postupné stíšenie vo vybranej oblasti",
"fadeInDisabledHint": "Ak chceš použiť postupné zosilnenie, vyber oblasť, ktorá sa začína na úplnom začiatku stopy",
"fadeOutDisabledHint": "Ak chceš použiť postupné zoslabenie, vyber oblasť, ktorá sa končí na úplnom konci stopy",
"trimEndDisabledHint": "Ak chceš orezať koniec, vyber oblasť, ktorá sa končí na úplnom konci stopy",
"trimEndSelection": "Odstrániť všetko za výberom",
"trimStartDisabledHint": "Ak chceš orezať začiatok, vyber oblasť, ktorá sa začína na úplnom začiatku stopy",
"trimStartSelection": "Odstrániť všetko pred výberom"
},
"audioEditRestore": {
"title": "Uložené relácie úprav zvuku",
@@ -807,7 +813,7 @@
"acceptAll": "Prijať všetky",
"revertAll": "Vrátiť všetky",
"undoAll": "Vrátiť späť všetky",
"resetAllChanges": "Obnoviť všetky zmeny späť na pôvodný text opravený AI",
"resetAllChanges": "Vrátiť všetky zmeny späť na pôvodný opravený text",
"undo": "Späť",
"redo": "Znova",
"findReplace": "Nájsť/Nahradiť",
@@ -821,8 +827,8 @@
"audioLoadError": "Nepodarilo sa načítať audio",
"audioStillLoading": "Audio sa stále načítava...",
"loadingAudio": "Načítava sa audio...",
"autoCorrect": "Návrhy AI",
"autoCorrectDesc": "Vygeneruj si návrhy opráv od AI porovnaním prepisu s referenčným textom. Nič sa nezmení, kým jednotlivé návrhy neprijmeš."
"autoCorrect": "Automatická oprava",
"autoCorrectDesc": "Vygeneruj návrhy na opravu porovnaním prepisu s referenčným textom. Nič sa nezmení, kým neschváliš každý návrh."
},
"guidance": {
"showTips": "Zobraziť tipy",
@@ -1294,18 +1300,18 @@
"category_other": "iné",
"category_repeated_chorus_fix": "refrén",
"collapse": "Zbaliť návrhy",
"confidenceHint": "Nakoľko si musí byť AI istá, aby zobrazila návrh",
"confidenceHint": "Aká vysoká musí byť miera istoty návrhu, aby sa zobrazil",
"confidenceLabel": "Filter návrhov",
"confidence_all": "Zobraziť všetko",
"confidence_high": "Vysoká istota",
"description": "AI porovná prepísaný text s referenčnými zdrojmi a navrhne opravy na úrovni jednotlivých slov. Každý návrh si môžeš skontrolovať — nič sa nezmení, kým ho neprijmeš.",
"description": "Automatická oprava porovnáva prepísaný text s referenčnými zdrojmi a navrhuje opravy na úrovni slov. Každý návrh skontroluješ — nič sa neaplikuje, kým ho neschváliš.",
"dismiss": "Zahodiť návrhy",
"expand": "Rozbaliť návrhy",
"insertMarker": "vložiť:",
"insertionsHint": "Povoliť návrhy na vloženie slov, ktoré v prepise chýbajú",
"insertionsLabel": "Navrhnúť chýbajúce slová",
"noReferences": "Pre túto pieseň nie sú k dispozícii žiadne referenčné texty, takže nie je možné vygenerovať návrhy AI. Najprv pridaj text z referenčného panela.",
"noSuggestions": "Nenašli sa žiadne problémy — AI nenavrhuje žiadne zmeny.",
"noReferences": "Pre túto pieseň nie je k dispozícii žiadny referenčný text, takže návrhy nie je možné vygenerovať. Najprv pridaj text z referenčného panela.",
"noSuggestions": "Nenašli sa žiadne problémy — nie sú tu žiadne navrhované zmeny.",
"reject": "Odmietnuť návrh",
"rejectAll": "Odmietnuť všetko",
"rejected": "Odmietnuté",
@@ -1313,7 +1319,7 @@
"running": "Analyzuje sa text… zvyčajne to trvá 15 – 60 sekúnd.",
"staleHint": "Tieto slová boli od vygenerovania návrhov upravené, takže tento návrh už neplatí.",
"summary": "{total} návrhov · {pending} čakajúcich · {accepted} prijatých",
"title": "Návrhy opráv AI",
"title": "Návrhy automatickej opravy",
"undo": "Vrátiť späť tento návrh",
"cancel": "Zrušiť",
"close": "Zavrieť",
@@ -1321,9 +1327,11 @@
"compareHint": "Je to pomalšie a stojí to viac, ale ukáže, na ktorých návrhoch sa zhoduje viacero modelov",
"compareLabel": "Porovnať viacero AI modelov",
"conflictBadge": "variant",
"conflictTooltip": "Modely sa nezhodujú na týchto slovách — prijatím jedného variantu odmietneš ostatné.",
"conflictTooltip": "Pre tieto slová existujú rôzne návrhy — prijatím jedného variantu odmietneš ostatné.",
"consensusBadge": "{consensus}/{total} modelov",
"consensusTooltip": "Navrhli: {models}"
"consensusTooltip": "Navrhli: {models}",
"cachedBadge": "z cache",
"cachedTooltip": "Obnovené z predchádzajúceho spustenia na rovnakom texte — nevznikli žiadne náklady na AI."
}
},
"instrumentalReview": {
+19 -11
View File
@@ -780,7 +780,13 @@
"fadeIn": "Tona in",
"fadeInSelection": "Tona in över det markerade området",
"fadeOut": "Tona ut",
"fadeOutSelection": "Tona ut över det markerade området"
"fadeOutSelection": "Tona ut över det markerade området",
"fadeInDisabledHint": "För att tona in, markera ett område som börjar precis i början av spåret",
"fadeOutDisabledHint": "För att tona ut, markera ett område som slutar precis i slutet av spåret",
"trimEndDisabledHint": "För att trimma slutet, markera ett område som slutar precis i slutet av spåret",
"trimEndSelection": "Ta bort allt efter markeringen",
"trimStartDisabledHint": "För att trimma början, markera ett område som börjar precis i början av spåret",
"trimStartSelection": "Ta bort allt före markeringen"
},
"audioEditRestore": {
"title": "Sparade ljudredigeringssessioner",
@@ -807,7 +813,7 @@
"acceptAll": "Acceptera alla",
"revertAll": "Återställ alla",
"undoAll": "Ångra alla",
"resetAllChanges": "Återställ alla ändringar tillbaka till den ursprungliga AI-korrigerade texten",
"resetAllChanges": "Återställ alla ändringar till den ursprungliga korrigerade låttexten",
"undo": "Ångra",
"redo": "Gör om",
"findReplace": "Sök/Ersätt",
@@ -821,8 +827,8 @@
"audioLoadError": "Kunde inte ladda ljudet",
"audioStillLoading": "Ljudet laddas fortfarande...",
"loadingAudio": "Laddar ljud...",
"autoCorrect": "AI-förslag",
"autoCorrectDesc": "Generera AI-korrigeringsförslag genom att jämföra transkriberingen med referenstexten. Inget ändras förrän du accepterar varje förslag."
"autoCorrect": "Autokorrigering",
"autoCorrectDesc": "Generera korrigeringsförslag genom att jämföra transkriptionen med referenstexten. Ingenting ändras förrän du accepterar varje förslag."
},
"guidance": {
"showTips": "Visa tips",
@@ -1294,18 +1300,18 @@
"category_other": "annat",
"category_repeated_chorus_fix": "refräng",
"collapse": "Fäll ihop förslag",
"confidenceHint": "Hur säker AI:n måste vara för att visa ett förslag",
"confidenceHint": "Hur säkert ett förslag måste vara innan det visas",
"confidenceLabel": "Förslagsfilter",
"confidence_all": "Visa alla",
"confidence_high": "Hög säkerhet",
"description": "AI:n jämför den transkriberade låttexten med referenskällorna och föreslår korrigeringar på ordnivå. Du granskar varje förslag — inget tillämpas förrän du accepterar det.",
"description": "Autokorrigering jämför den transkriberade låttexten med referenskällorna och föreslår rättningar på ordnivå. Du granskar varje förslag — ingenting tillämpas förrän du accepterar det.",
"dismiss": "Avfärda förslag",
"expand": "Fäll ut förslag",
"insertMarker": "infoga:",
"insertionsHint": "Tillåt förslag som infogar ord som transkriberingen missade",
"insertionsLabel": "Föreslå saknade ord",
"noReferences": "Inga referenstexter är tillgängliga för den här låten, så AI-förslag kan inte genereras. Lägg till låttext från referenspanelen först.",
"noSuggestions": "Inga problem hittades — AI:n har inga föreslagna ändringar.",
"noReferences": "Det finns inga referenstexter för den här låten, så det går inte att generera några förslag. Lägg till en text från referenspanelen först.",
"noSuggestions": "Inga problem hittades — det finns inga föreslagna ändringar.",
"reject": "Avvisa förslag",
"rejectAll": "Avvisa alla",
"rejected": "Avvisat",
@@ -1313,7 +1319,7 @@
"running": "Analyserar låttext… detta tar vanligtvis 15–60 sekunder.",
"staleHint": "Dessa ord har redigerats sedan förslagen genererades, så detta förslag gäller inte längre.",
"summary": "{total} förslag · {pending} väntande · {accepted} accepterade",
"title": "AI-korrigeringsförslag",
"title": "Autokorrigeringsförslag",
"undo": "Ångra detta förslag",
"cancel": "Avbryt",
"close": "Stäng",
@@ -1321,9 +1327,11 @@
"compareHint": "Långsammare och kostar mer, men visar vilka förslag flera modeller är överens om",
"compareLabel": "Jämför flera AI-modeller",
"conflictBadge": "variant",
"conflictTooltip": "Modellerna är oense om dessa ord — om du accepterar en variant väljs de andra bort.",
"conflictTooltip": "Det finns olika förslag för dessa ord — om du accepterar en variant avvisas de andra.",
"consensusBadge": "{consensus}/{total} modeller",
"consensusTooltip": "Föreslaget av: {models}"
"consensusTooltip": "Föreslaget av: {models}",
"cachedBadge": "cachad",
"cachedTooltip": "Återställd från en tidigare körning på samma låttext — ingen AI-kostnad tillkom."
}
},
"instrumentalReview": {
+19 -11
View File
@@ -780,7 +780,13 @@
"fadeIn": "เฟดอิน",
"fadeInSelection": "เฟดอินในส่วนที่เลือก",
"fadeOut": "เฟดเอาต์",
"fadeOutSelection": "เฟดเอาต์ในส่วนที่เลือก"
"fadeOutSelection": "เฟดเอาต์ในส่วนที่เลือก",
"fadeInDisabledHint": "หากต้องการเฟดอิน ให้เลือกช่วงที่เริ่มตั้งแต่จุดแรกสุดของแทร็ก",
"fadeOutDisabledHint": "หากต้องการเฟดเอาต์ ให้เลือกช่วงที่สิ้นสุดตรงจุดท้ายสุดของแทร็ก",
"trimEndDisabledHint": "หากต้องการตัดส่วนท้ายออก ให้เลือกช่วงที่สิ้นสุดตรงจุดท้ายสุดของแทร็ก",
"trimEndSelection": "ลบทุกอย่างที่อยู่หลังส่วนที่เลือก",
"trimStartDisabledHint": "หากต้องการตัดส่วนต้นออก ให้เลือกช่วงที่เริ่มตั้งแต่จุดแรกสุดของแทร็ก",
"trimStartSelection": "ลบทุกอย่างที่อยู่ก่อนส่วนที่เลือก"
},
"audioEditRestore": {
"title": "เซสชันการแก้ไขเสียงที่บันทึกไว้",
@@ -807,7 +813,7 @@
"acceptAll": "ยอมรับทั้งหมด",
"revertAll": "ย้อนกลับทั้งหมด",
"undoAll": "เลิกทำทั้งหมด",
"resetAllChanges": "รีเซ็ตการเปลี่ยนแปลงทั้งหมดกลับไปเป็นเนื้อเพลงที่แก้ไขโดย AI ต้นฉบับ",
"resetAllChanges": "รีเซ็ตการเปลี่ยนแปลงทั้งหมดกลับไปเป็นเนื้อเพลงที่แก้ไขไว้ตอนแรก",
"undo": "เลิกทำ",
"redo": "ทำซ้ำ",
"findReplace": "ค้นหา/แทนที่",
@@ -821,8 +827,8 @@
"audioLoadError": "ไม่สามารถโหลดเสียงได้",
"audioStillLoading": "ไฟล์เสียงยังโหลดอยู่...",
"loadingAudio": "กำลังโหลดไฟล์เสียง...",
"autoCorrect": "AI แนะนำ",
"autoCorrectDesc": "สร้างคำแนะนำการแก้ไขจาก AI โดยเปรียบเทียบการถอดความกับเนื้อเพลงอ้างอิง จะไม่มีการเปลี่ยนแปลงใดๆ จนกว่าคุณจะยอมรับแต่ละคำแนะนำ"
"autoCorrect": "แก้ไขอัตโนมัติ",
"autoCorrectDesc": "สร้างคำแนะนำการแก้ไขโดยเปรียบเทียบการถอดเสียงกับเนื้อเพลงอ้างอิง จะไม่มีการเปลี่ยนแปลงใดๆ จนกว่าคุณจะยอมรับแต่ละคำแนะนำ"
},
"guidance": {
"showTips": "แสดงเคล็ดลับ",
@@ -1294,18 +1300,18 @@
"category_other": "อื่นๆ",
"category_repeated_chorus_fix": "คอรัส",
"collapse": "ย่อคำแนะนำ",
"confidenceHint": "ระดับความมั่นใจของ AI ในการแสดงคำแนะนำ",
"confidenceHint": "ระดับความมั่นใจขั้นต่ำก่อนแสดงคำแนะนำ",
"confidenceLabel": "ตัวกรองคำแนะนำ",
"confidence_all": "แสดงทั้งหมด",
"confidence_high": "ความมั่นใจสูง",
"description": "AI จะเปรียบเทียบเนื้อเพลงที่ถอดความกับแหล่งอ้างอิงและแนะนำการแก้ไขในระดับคำ คุณสามารถตรวจสอบทุกคำแนะนำได้ — จะไม่มีการเปลี่ยนแปลงใดๆ จนกว่าคุณจะกดยอมรับ",
"description": "ระบบแก้ไขอัตโนมัติจะเปรียบเทียบเนื้อเพลงที่ถอดเสียงกับแหล่งอ้างอิงและแนะนำการแก้ไขในระดับคำ คุณสามารถตรวจสอบทุกคำแนะนำ — จะไม่มีการเปลี่ยนแปลงใดๆ จนกว่าคุณจะกดยอมรับ",
"dismiss": "ปิดคำแนะนำ",
"expand": "ขยายคำแนะนำ",
"insertMarker": "แทรก:",
"insertionsHint": "อนุญาตให้แนะนำการแทรกคำที่ตกหล่นจากการถอดความ",
"insertionsLabel": "แนะนำคำที่หายไป",
"noReferences": "ไม่มีเนื้อเพลงอ้างอิงสำหรับเพลงนี้ จึงไม่สามารถสร้างคำแนะนำจาก AI ได้ กรุณาเพิ่มเนื้อเพลงจากแผงอ้างอิงก่อน",
"noSuggestions": "ไม่พบปัญหา — AI ไม่มีคำแนะนำในการแก้ไข",
"noReferences": "ไม่มีเนื้อเพลงอ้างอิงสำหรับเพลงนี้ จึงไม่สามารถสร้างคำแนะนำได้ โปรดเพิ่มเนื้อเพลงจากแผงอ้างอิงก่อน",
"noSuggestions": "ไม่พบปัญหา — ไม่มีคำแนะนำในการแก้ไข",
"reject": "ปฏิเสธคำแนะนำ",
"rejectAll": "ปฏิเสธทั้งหมด",
"rejected": "ปฏิเสธแล้ว",
@@ -1313,7 +1319,7 @@
"running": "กำลังวิเคราะห์เนื้อเพลง… โดยปกติจะใช้เวลา 15–60 วินาที",
"staleHint": "คำเหล่านี้ถูกแก้ไขหลังจากที่สร้างคำแนะนำแล้ว คำแนะนำนี้จึงไม่สามารถใช้ได้อีกต่อไป",
"summary": "{total} คำแนะนำ · รอดำเนินการ {pending} รายการ · ยอมรับแล้ว {accepted} รายการ",
"title": "คำแนะนำการแก้ไขจาก AI",
"title": "คำแนะนำการแก้ไขอัตโนมัติ",
"undo": "เลิกทำคำแนะนำนี้",
"cancel": "ยกเลิก",
"close": "ปิด",
@@ -1321,9 +1327,11 @@
"compareHint": "ช้ากว่าและมีค่าใช้จ่ายสูงกว่า แต่จะแสดงคำแนะนำที่โมเดลหลายตัวเห็นตรงกัน",
"compareLabel": "เปรียบเทียบโมเดล AI หลายตัว",
"conflictBadge": "ตัวเลือก",
"conflictTooltip": "โมเดลให้ผลลัพธ์คำเหล่านี้ไม่ตรงกัน — การเลือกตัวเลือกหนึ่งจะเป็นการปฏิเสธตัวเลือกอื่นๆ",
"conflictTooltip": "มีคำแนะนำหลายแบบสำหรับคำเหล่านี้ — การเลือกแบบหนึ่งจะเป็นการปฏิเสธแบบอื่นๆ",
"consensusBadge": "{consensus}/{total} โมเดล",
"consensusTooltip": "เสนอโดย: {models}"
"consensusTooltip": "เสนอโดย: {models}",
"cachedBadge": "แคชไว้",
"cachedTooltip": "กู้คืนจากการประมวลผลเนื้อเพลงเดียวกันในครั้งก่อนหน้า — ไม่มีการคิดค่าใช้จ่าย AI"
}
},
"instrumentalReview": {
+19 -11
View File
@@ -780,7 +780,13 @@
"fadeIn": "Fade In",
"fadeInSelection": "Mag-fade in sa napiling bahagi",
"fadeOut": "Fade Out",
"fadeOutSelection": "Mag-fade out sa napiling bahagi"
"fadeOutSelection": "Mag-fade out sa napiling bahagi",
"fadeInDisabledHint": "Para mag-fade in, pumili ng bahagi na nagsisimula sa mismong simula ng track",
"fadeOutDisabledHint": "Para mag-fade out, pumili ng bahagi na nagtatapos sa mismong dulo ng track",
"trimEndDisabledHint": "Para i-trim ang dulo, pumili ng bahagi na nagtatapos sa mismong dulo ng track",
"trimEndSelection": "Alisin ang lahat pagkatapos ng napiling bahagi",
"trimStartDisabledHint": "Para i-trim ang simula, pumili ng bahagi na nagsisimula sa mismong simula ng track",
"trimStartSelection": "Alisin ang lahat bago ang napiling bahagi"
},
"audioEditRestore": {
"title": "Mga Naka-save na Audio Edit Session",
@@ -807,7 +813,7 @@
"acceptAll": "Tanggapin Lahat",
"revertAll": "I-revert Lahat",
"undoAll": "I-undo Lahat",
"resetAllChanges": "I-reset ang lahat ng pagbabago pabalik sa orihinal na AI-corrected lyrics",
"resetAllChanges": "I-reset ang lahat ng pagbabago pabalik sa orihinal na naiwastong lyrics",
"undo": "I-undo",
"redo": "I-redo",
"findReplace": "Hanapin/Palitan",
@@ -821,8 +827,8 @@
"audioLoadError": "Hindi ma-load ang audio",
"audioStillLoading": "Naglo-load pa rin ang audio...",
"loadingAudio": "Naglo-load ang audio...",
"autoCorrect": "AI Suggest",
"autoCorrectDesc": "Bumuo ng mga mungkahi sa pagwawasto ng AI sa pamamagitan ng pagkukumpara ng transcription sa reference lyrics. Walang mababago hangga't hindi mo tinatanggap ang bawat mungkahi."
"autoCorrect": "Auto-correct",
"autoCorrectDesc": "Bumuo ng mga mungkahi sa pagwawasto sa pamamagitan ng paghahambing ng transcription sa reference lyrics. Walang mababago hangga't hindi mo tinatanggap ang bawat mungkahi."
},
"guidance": {
"showTips": "Ipakita ang mga tip",
@@ -1294,18 +1300,18 @@
"category_other": "iba pa",
"category_repeated_chorus_fix": "chorus",
"collapse": "I-collapse ang mga mungkahi",
"confidenceHint": "Gaano dapat kasigurado ang AI para magpakita ng mungkahi",
"confidenceHint": "Kung gaano katiyak ang isang mungkahi bago ito ipakita",
"confidenceLabel": "Filter ng mungkahi",
"confidence_all": "Ipakita lahat",
"confidence_high": "Mataas na kasiguraduhan",
"description": "Ikinukumpara ng AI ang mga na-transcribe na lyrics sa mga reference source at nagmumungkahi ng mga pag-aayos sa bawat salita. Susuriin mo ang bawat mungkahi — walang mababago hangga't hindi mo ito tinatanggap.",
"description": "Inihahambing ng auto-correct ang mga na-transcribe na lyrics sa mga reference source at nagmumungkahi ng mga pag-aayos sa bawat salita. Susuriin mo ang bawat mungkahi — walang ilalapat hangga't hindi mo ito tinatanggap.",
"dismiss": "I-dismiss ang mga mungkahi",
"expand": "I-expand ang mga mungkahi",
"insertMarker": "idagdag:",
"insertionsHint": "Payagan ang mga mungkahi na magdagdag ng mga salitang nakaligtaan sa transcription",
"insertionsLabel": "I-suggest ang mga nawawalang salita",
"noReferences": "Walang available na reference lyrics para sa kantang ito, kaya hindi makakagawa ng mga AI suggestion. Magdagdag muna ng lyrics mula sa reference panel.",
"noSuggestions": "Walang nakitang isyu — walang iminumungkahing pagbabago ang AI.",
"noReferences": "Walang available na reference lyrics para sa kantang ito, kaya hindi makabuo ng mga mungkahi. Magdagdag muna ng lyrics mula sa reference panel.",
"noSuggestions": "Walang nakitang isyu — walang mga iminungkahing pagbabago.",
"reject": "Tanggihan ang mungkahi",
"rejectAll": "Tanggihan lahat",
"rejected": "Tinanggihan",
@@ -1313,7 +1319,7 @@
"running": "Sinusuri ang lyrics… karaniwang tumatagal ito ng 15–60 segundo.",
"staleHint": "Na-edit na ang mga salitang ito simula nang ginawa ang mga mungkahi, kaya hindi na naaangkop ang mungkahing ito.",
"summary": "{total} mungkahi · {pending} nakabinbin · {accepted} tinanggap",
"title": "Mga mungkahi sa pagwawasto ng AI",
"title": "Mga mungkahi ng auto-correct",
"undo": "I-undo ang mungkahing ito",
"cancel": "Kanselahin",
"close": "Isara",
@@ -1321,9 +1327,11 @@
"compareHint": "Mas mabagal at mas mahal, pero ipinapakita nito kung aling mga mungkahi ang sinasang-ayunan ng iba't ibang modelo",
"compareLabel": "Paghambingin ang iba't ibang AI model",
"conflictBadge": "variant",
"conflictTooltip": "Hindi magkakatugma ang mga modelo sa mga salitang ito — kapag tinanggap ang isang variant, tatanggihan ang iba.",
"conflictTooltip": "May iba't ibang mungkahi para sa mga salitang ito — ang pagtanggap sa isang variant ay magbabalewala sa iba.",
"consensusBadge": "{consensus}/{total} modelo",
"consensusTooltip": "Iminungkahi ng: {models}"
"consensusTooltip": "Iminungkahi ng: {models}",
"cachedBadge": "naka-cache",
"cachedTooltip": "Na-restore mula sa nakaraang pag-proseso ng parehong lyrics — walang nagastos na AI cost."
}
},
"instrumentalReview": {
+19 -11
View File
@@ -780,7 +780,13 @@
"fadeIn": "Sesi Kademeli Artır",
"fadeInSelection": "Seçili bölgede sesi kademeli artır",
"fadeOut": "Sesi Kademeli Azalt",
"fadeOutSelection": "Seçili bölgede sesi kademeli azalt"
"fadeOutSelection": "Seçili bölgede sesi kademeli azalt",
"fadeInDisabledHint": "Sesi yavaşça açmak için parçanın en başından başlayan bir bölge seç",
"fadeOutDisabledHint": "Sesi yavaşça kısmak için parçanın en sonunda biten bir bölge seç",
"trimEndDisabledHint": "Sonu kırpmak için parçanın en sonunda biten bir bölge seç",
"trimEndSelection": "Seçimden sonraki her şeyi kaldır",
"trimStartDisabledHint": "Başlangıcı kırpmak için parçanın en başından başlayan bir bölge seç",
"trimStartSelection": "Seçimden önceki her şeyi kaldır"
},
"audioEditRestore": {
"title": "Kaydedilmiş Ses Düzenleme Oturumları",
@@ -807,7 +813,7 @@
"acceptAll": "Tümünü Kabul Et",
"revertAll": "Tümünü Geri Al",
"undoAll": "Tümünü Geri Al",
"resetAllChanges": "Tüm değişiklikleri orijinal yapay zeka düzeltmeli sözlere sıfırla",
"resetAllChanges": "Tüm değişiklikleri sıfırla ve orijinal düzeltilmiş şarkı sözlerine geri dön",
"undo": "Geri Al",
"redo": "Yinele",
"findReplace": "Bul/Değiştir",
@@ -821,8 +827,8 @@
"audioLoadError": "Ses yüklenemedi",
"audioStillLoading": "Ses hâlâ yükleniyor...",
"loadingAudio": "Ses yükleniyor...",
"autoCorrect": "Yapay Zeka Önerisi",
"autoCorrectDesc": "Deşifreyi referans şarkı sözleriyle karşılaştırarak yapay zeka düzeltme önerileri oluştur. Sen her bir öneriyi kabul edene kadar hiçbir şey değiştirilmez."
"autoCorrect": "Otomatik düzeltme",
"autoCorrectDesc": "Yazıya dökülen metni referans şarkı sözleriyle karşılaştırarak düzeltme önerileri oluştur. Sen her bir öneriyi onaylamadan hiçbir şey değiştirilmez."
},
"guidance": {
"showTips": "İpuçlarını göster",
@@ -1294,18 +1300,18 @@
"category_other": "diğer",
"category_repeated_chorus_fix": "nakarat",
"collapse": "Önerileri daralt",
"confidenceHint": "Yapay zekanın bir öneri göstermesi için ne kadar emin olması gerektiği",
"confidenceHint": "Bir önerinin gösterilmesi için gereken güvenilirlik seviyesi",
"confidenceLabel": "Öneri filtresi",
"confidence_all": "Tümünü göster",
"confidence_high": "Yüksek güven",
"description": "Yapay zeka, deşifre edilen şarkı sözlerini referans kaynaklarla karşılaştırır ve kelime düzeyinde düzeltmeler önerir. Her öneriyi sen incelersin — sen kabul edene kadar hiçbir şey uygulanmaz.",
"description": "Otomatik düzeltme, yazıya dökülen şarkı sözlerini referans kaynaklarla karşılaştırır ve kelime bazında düzeltmeler önerir. Tüm önerileri sen incelersin — sen onaylamadan hiçbir değişiklik uygulanmaz.",
"dismiss": "Önerileri yoksay",
"expand": "Önerileri genişlet",
"insertMarker": "ekle:",
"insertionsHint": "Deşifrede eksik olan kelimeleri ekleyen önerilere izin ver",
"insertionsLabel": "Eksik kelimeleri öner",
"noReferences": "Bu şarkı için referans şarkı sözü bulunmuyor, bu yüzden yapay zeka önerileri oluşturulamıyor. Önce referans panelinden şarkı sözlerini ekle.",
"noSuggestions": "Hiçbir sorun bulunamadı — yapay zekanın önerdiği bir değişiklik yok.",
"noReferences": "Bu şarkı için referans şarkı sözleri bulunmuyor, bu yüzden öneriler oluşturulamıyor. Önce referans panelinden şarkı sözlerini ekle.",
"noSuggestions": "Sorun bulunamadı — önerilen bir değişiklik yok.",
"reject": "Öneriyi reddet",
"rejectAll": "Tümünü reddet",
"rejected": "Reddedildi",
@@ -1313,7 +1319,7 @@
"running": "Şarkı sözleri analiz ediliyor… bu genellikle 15–60 saniye sürer.",
"staleHint": "Bu kelimeler öneriler oluşturulduktan sonra düzenlendi, bu yüzden bu öneri artık geçerli değil.",
"summary": "{total} öneri · {pending} bekleyen · {accepted} kabul edilen",
"title": "Yapay zeka düzeltme önerileri",
"title": "Otomatik düzeltme önerileri",
"undo": "Bu öneriyi geri al",
"cancel": "İptal",
"close": "Kapat",
@@ -1321,9 +1327,11 @@
"compareHint": "Daha yavaş ve daha maliyetli, ancak birden fazla modelin hangi önerilerde uzlaştığını gösterir",
"compareLabel": "Birden fazla yapay zeka modelini karşılaştır",
"conflictBadge": "varyant",
"conflictTooltip": "Modeller bu kelimeler konusunda uyuşmuyor — bir varyantı kabul ettiğinde diğerlerini reddetmiş olursun.",
"conflictTooltip": "Bu kelimeler için farklı öneriler var — bir seçeneği kabul ettiğinde diğerleri reddedilir.",
"consensusBadge": "{consensus}/{total} model",
"consensusTooltip": "Öneren: {models}"
"consensusTooltip": "Öneren: {models}",
"cachedBadge": "önbellekten",
"cachedTooltip": "Aynı şarkı sözleriyle yapılan önceki bir işlemden geri yüklendi — yapay zeka maliyeti oluşmadı."
}
},
"instrumentalReview": {
+19 -11
View File
@@ -780,7 +780,13 @@
"fadeIn": "Плавне наростання",
"fadeInSelection": "Плавне наростання у виділеному фрагменті",
"fadeOut": "Плавне згасання",
"fadeOutSelection": "Плавне згасання у виділеному фрагменті"
"fadeOutSelection": "Плавне згасання у виділеному фрагменті",
"fadeInDisabledHint": "Щоб зробити плавне наростання звуку, виділи ділянку, яка починається із самого початку треку",
"fadeOutDisabledHint": "Щоб зробити плавне затухання звуку, виділи ділянку, яка закінчується у самому кінці треку",
"trimEndDisabledHint": "Щоб обрізати кінець, виділи ділянку, яка закінчується у самому кінці треку",
"trimEndSelection": "Видалити все після виділеної ділянки",
"trimStartDisabledHint": "Щоб обрізати початок, виділи ділянку, яка починається із самого початку треку",
"trimStartSelection": "Видалити все до виділеної ділянки"
},
"audioEditRestore": {
"title": "Збережені сеанси редагування аудіо",
@@ -807,7 +813,7 @@
"acceptAll": "Прийняти всі",
"revertAll": "Повернути всі",
"undoAll": "Скасувати всі",
"resetAllChanges": "Скинути всі зміни до оригінального тексту, виправленого ШІ",
"resetAllChanges": "Скинути всі зміни до початкового виправленого тексту",
"undo": "Скасувати",
"redo": "Повторити",
"findReplace": "Знайти/Замінити",
@@ -821,8 +827,8 @@
"audioLoadError": "Не вдалося завантажити аудіо",
"audioStillLoading": "Аудіо ще завантажується...",
"loadingAudio": "Завантаження аудіо...",
"autoCorrect": "Пропозиції ШІ",
"autoCorrectDesc": "Генеруй пропозиції виправлень від ШІ, порівнюючи транскрипцію з еталонним текстом. Нічого не зміниться, поки ти не приймеш кожну пропозицію."
"autoCorrect": "Автовиправлення",
"autoCorrectDesc": "Згенеруй пропозиції виправлень, порівнявши транскрипцію з еталонним текстом. Нічого не зміниться, поки ти не приймеш кожну пропозицію."
},
"guidance": {
"showTips": "Показати підказки",
@@ -1294,18 +1300,18 @@
"category_other": "інше",
"category_repeated_chorus_fix": "приспів",
"collapse": "Згорнути пропозиції",
"confidenceHint": "Наскільки впевненим має бути ШІ, щоб показати пропозицію",
"confidenceHint": "Наскільки надійною має бути пропозиція, перш ніж її буде показано",
"confidenceLabel": "Фільтр пропозицій",
"confidence_all": "Показати всі",
"confidence_high": "Висока впевненість",
"description": "ШІ порівнює транскрибований текст із еталонними джерелами та пропонує виправлення на рівні слів. Ти перевіряєш кожну пропозицію — нічого не застосовується, поки ти її не приймеш.",
"description": "Автовиправлення порівнює транскрибований текст із еталонними джерелами та пропонує виправлення окремих слів. Ти перевіряєш кожну пропозицію — нічого не застосується, поки ти її не приймеш.",
"dismiss": "Приховати пропозиції",
"expand": "Розгорнути пропозиції",
"insertMarker": "вставити:",
"insertionsHint": "Дозволити пропозиції, що додають слова, пропущені в транскрипції",
"insertionsLabel": "Пропонувати пропущені слова",
"noReferences": "Для цієї пісні немає еталонних текстів, тому пропозиції ШІ неможливо згенерувати. Спочатку додай текст на панелі еталонних текстів.",
"noSuggestions": "Проблем не знайдено — ШІ не має пропозицій щодо змін.",
"noReferences": "Для цієї пісні немає еталонного тексту, тому згенерувати пропозиції неможливо. Спочатку додай текст із панелі еталонів.",
"noSuggestions": "Проблем не знайдено — немає запропонованих змін.",
"reject": "Відхилити пропозицію",
"rejectAll": "Відхилити всі",
"rejected": "Відхилено",
@@ -1313,7 +1319,7 @@
"running": "Аналізуємо текст… зазвичай це займає 15–60 секунд.",
"staleHint": "Ці слова були відредаговані після генерації пропозицій, тому ця пропозиція більше не актуальна.",
"summary": "{total} пропозицій · {pending} очікують · {accepted} прийнято",
"title": "Пропозиції виправлень від ШІ",
"title": "Пропозиції автовиправлення",
"undo": "Скасувати цю пропозицію",
"cancel": "Скасувати",
"close": "Закрити",
@@ -1321,9 +1327,11 @@
"compareHint": "Повільніше та дорожче, але показує, з якими пропозиціями погоджуються кілька моделей",
"compareLabel": "Порівняти кілька моделей ШІ",
"conflictBadge": "варіант",
"conflictTooltip": "Моделі розійшлися щодо цих слів — обравши один варіант, ти відхилиш інші.",
"conflictTooltip": "Для цих слів є різні пропозиції — якщо прийняти один варіант, інші будуть відхилені.",
"consensusBadge": "{consensus}/{total} моделей",
"consensusTooltip": "Запропоновано: {models}"
"consensusTooltip": "Запропоновано: {models}",
"cachedBadge": "кешовано",
"cachedTooltip": "Відновлено з попереднього запуску для цього ж тексту пісні — без витрат на ШІ."
}
},
"instrumentalReview": {
+19 -11
View File
@@ -780,7 +780,13 @@
"fadeIn": "Tăng dần âm lượng",
"fadeInSelection": "Tăng dần âm lượng trong vùng đã chọn",
"fadeOut": "Giảm dần âm lượng",
"fadeOutSelection": "Giảm dần âm lượng trong vùng đã chọn"
"fadeOutSelection": "Giảm dần âm lượng trong vùng đã chọn",
"fadeInDisabledHint": "Để tăng dần âm lượng, hãy chọn một đoạn bắt đầu ngay từ đầu bản nhạc",
"fadeOutDisabledHint": "Để giảm dần âm lượng, hãy chọn một đoạn kết thúc ngay ở cuối bản nhạc",
"trimEndDisabledHint": "Để cắt phần cuối, hãy chọn một đoạn kết thúc ngay ở cuối bản nhạc",
"trimEndSelection": "Xóa mọi thứ sau phần được chọn",
"trimStartDisabledHint": "Để cắt phần đầu, hãy chọn một đoạn bắt đầu ngay từ đầu bản nhạc",
"trimStartSelection": "Xóa mọi thứ trước phần được chọn"
},
"audioEditRestore": {
"title": "Các phiên chỉnh sửa âm thanh đã lưu",
@@ -807,7 +813,7 @@
"acceptAll": "Chấp nhận tất cả",
"revertAll": "Hoàn nguyên tất cả",
"undoAll": "Hoàn tác tất cả",
"resetAllChanges": "Khôi phục tất cả thay đổi về lời bài hát gốc do AI tạo",
"resetAllChanges": "Khôi phục tất cả thay đổi về lời bài hát đã sửa ban đầu",
"undo": "Hoàn tác",
"redo": "Làm lại",
"findReplace": "Tìm/Thay thế",
@@ -821,8 +827,8 @@
"audioLoadError": "Không thể tải âm thanh",
"audioStillLoading": "Âm thanh vẫn đang tải...",
"loadingAudio": "Đang tải âm thanh...",
"autoCorrect": "Đề xuất từ AI",
"autoCorrectDesc": "Tạo các đề xuất sửa lỗi từ AI bằng cách so sánh bản chép lời với lời bài hát tham khảo. Sẽ không có thay đổi nào được áp dụng cho đến khi bạn chấp nhận từng đề xuất."
"autoCorrect": "Tự động sửa lỗi",
"autoCorrectDesc": "Tạo các đề xuất sửa lỗi bằng cách so sánh bản chép lời với lời bài hát tham khảo. Sẽ không có thay đổi nào được áp dụng cho đến khi bạn chấp nhận từng đề xuất."
},
"guidance": {
"showTips": "Hiện mẹo",
@@ -1294,18 +1300,18 @@
"category_other": "khác",
"category_repeated_chorus_fix": "điệp khúc",
"collapse": "Thu gọn đề xuất",
"confidenceHint": "Mức độ chắc chắn của AI để hiển thị đề xuất",
"confidenceHint": "Mức độ tin cậy cần thiết để hiển thị đề xuất",
"confidenceLabel": "Bộ lọc đề xuất",
"confidence_all": "Hiển thị tất cả",
"confidence_high": "Độ chắc chắn cao",
"description": "AI sẽ so sánh bản chép lời với các nguồn tham khảo và đề xuất sửa lỗi cho từng từ. Bạn có thể xem xét từng đề xuất — sẽ không có thay đổi nào được áp dụng cho đến khi bạn chấp nhận.",
"description": "Tính năng Tự động sửa lỗi sẽ so sánh bản chép lời với các nguồn tham khảo và đề xuất sửa lỗi cho từng từ. Bạn có thể xem xét từng đề xuất — sẽ không có thay đổi nào được áp dụng cho đến khi bạn chấp nhận.",
"dismiss": "Bỏ qua đề xuất",
"expand": "Mở rộng đề xuất",
"insertMarker": "chèn:",
"insertionsHint": "Cho phép các đề xuất chèn những từ mà bản chép lời bỏ sót",
"insertionsLabel": "Đề xuất các từ còn thiếu",
"noReferences": "Bài hát này chưa có lời tham khảo nên AI không thể tạo đề xuất. Bạn hãy thêm lời bài hát từ bảng tham khảo trước nhé.",
"noSuggestions": "Không tìm thấy vấn đề nào — AI không có đề xuất thay đổi nào.",
"noReferences": "Không có lời bài hát tham khảo nào cho bài hát này, vì vậy không thể tạo đề xuất. Hãy thêm lời bài hát từ bảng tham khảo trước.",
"noSuggestions": "Không tìm thấy vấn đề nào — không có thay đổi nào được đề xuất.",
"reject": "Từ chối đề xuất",
"rejectAll": "Từ chối tất cả",
"rejected": "Đã từ chối",
@@ -1313,7 +1319,7 @@
"running": "Đang phân tích lời bài hát… quá trình này thường mất 15–60 giây.",
"staleHint": "Những từ này đã được chỉnh sửa sau khi đề xuất được tạo, nên đề xuất này không còn phù hợp nữa.",
"summary": "{total} đề xuất · {pending} đang chờ · {accepted} đã chấp nhận",
"title": "Đề xuất sửa lỗi của AI",
"title": "Đề xuất tự động sửa lỗi",
"undo": "Hoàn tác đề xuất này",
"cancel": "Hủy",
"close": "Đóng",
@@ -1321,9 +1327,11 @@
"compareHint": "Chậm hơn và tốn phí hơn, nhưng cho thấy các gợi ý được nhiều mô hình cùng đồng thuận",
"compareLabel": "So sánh nhiều mô hình AI",
"conflictBadge": "biến thể",
"conflictTooltip": "Các mô hình không đồng nhất về những từ này — chấp nhận một biến thể sẽ loại bỏ các biến thể khác.",
"conflictTooltip": "Có nhiều đề xuất khác nhau cho những từ này — khi chấp nhận một phương án, các phương án khác sẽ bị loại bỏ.",
"consensusBadge": "{consensus}/{total} mô hình",
"consensusTooltip": "Đề xuất bởi: {models}"
"consensusTooltip": "Đề xuất bởi: {models}",
"cachedBadge": "đã lưu cache",
"cachedTooltip": "Được khôi phục từ lần chạy trước với cùng lời bài hát — không phát sinh chi phí AI."
}
},
"instrumentalReview": {
+19 -11
View File
@@ -780,7 +780,13 @@
"fadeIn": "淡入",
"fadeInSelection": "在选定区域淡入",
"fadeOut": "淡出",
"fadeOutSelection": "在选定区域淡出"
"fadeOutSelection": "在选定区域淡出",
"fadeInDisabledHint": "如需添加淡入效果,请选择从音轨最开头开始的区域",
"fadeOutDisabledHint": "如需添加淡出效果,请选择在音轨最末尾结束的区域",
"trimEndDisabledHint": "如需裁剪结尾,请选择在音轨最末尾结束的区域",
"trimEndSelection": "移除所选区域之后的所有内容",
"trimStartDisabledHint": "如需裁剪开头,请选择从音轨最开头开始的区域",
"trimStartSelection": "移除所选区域之前的所有内容"
},
"audioEditRestore": {
"title": "已保存的音频编辑会话",
@@ -807,7 +813,7 @@
"acceptAll": "全部接受",
"revertAll": "全部还原",
"undoAll": "全部撤销",
"resetAllChanges": "将所有更改重置回原始的 AI 校对歌词",
"resetAllChanges": "将所有更改重置为最初的纠错歌词",
"undo": "撤销",
"redo": "重做",
"findReplace": "查找/替换",
@@ -821,8 +827,8 @@
"audioLoadError": "无法加载音频",
"audioStillLoading": "音频仍在加载中...",
"loadingAudio": "正在加载音频...",
"autoCorrect": "AI 建议",
"autoCorrectDesc": "通过将转录歌词与参考歌词进行对比来生成 AI 纠错建议。在您接受每条建议之前,不会更改任何内容。"
"autoCorrect": "自动纠错",
"autoCorrectDesc": "通过将转录内容与参考歌词进行比较来生成纠错建议。在您接受每条建议之前,不会进行任何更改。"
},
"guidance": {
"showTips": "显示提示",
@@ -1294,18 +1300,18 @@
"category_other": "其他",
"category_repeated_chorus_fix": "副歌",
"collapse": "折叠建议",
"confidenceHint": "AI 显示建议所需的置信度",
"confidenceHint": "显示建议所需的置信度",
"confidenceLabel": "建议筛选器",
"confidence_all": "显示全部",
"confidence_high": "高置信度",
"description": "AI 会将转录的歌词与参考来源进行对比,并提供词级别的修改建议。您可以逐一审核所有建议——在您接受之前,不会应用任何更改。",
"description": "自动纠错功能会将转录歌词与参考来源进行比较,并提供词级别的修改建议。您可以审查每条建议——在您接受之前,不会应用任何更改。",
"dismiss": "忽略建议",
"expand": "展开建议",
"insertMarker": "插入:",
"insertionsHint": "允许建议插入转录漏掉的词",
"insertionsLabel": "建议补充漏词",
"noReferences": "这首歌没有可用的参考歌词,因此无法生成 AI 建议。请先从参考面板添加歌词。",
"noSuggestions": "未发现问题——AI 没有修改建议。",
"noReferences": "此歌曲没有可用的参考歌词,因此无法生成建议。请先从参考面板添加歌词。",
"noSuggestions": "未发现问题——没有修改建议。",
"reject": "拒绝建议",
"rejectAll": "全部拒绝",
"rejected": "已拒绝",
@@ -1313,7 +1319,7 @@
"running": "正在分析歌词……这通常需要 15–60 秒。",
"staleHint": "这些词在生成建议后已被编辑,因此该建议不再适用。",
"summary": "{total} 条建议 · {pending} 条待处理 · {accepted} 条已接受",
"title": "AI 纠错建议",
"title": "自动纠错建议",
"undo": "撤销此建议",
"cancel": "取消",
"close": "关闭",
@@ -1321,9 +1327,11 @@
"compareHint": "速度较慢且成本较高,但会显示多个模型一致认可的建议",
"compareLabel": "比较多个 AI 模型",
"conflictBadge": "选项",
"conflictTooltip": "各模型对这些词存在分歧 —— 接受其中一个选项将放弃其他选项。",
"conflictTooltip": "这些词有不同的修改建议——接受其中一个会自动拒绝其他建议。",
"consensusBadge": "{consensus}/{total} 个模型",
"consensusTooltip": "推荐模型:{models}"
"consensusTooltip": "推荐模型:{models}",
"cachedBadge": "已缓存",
"cachedTooltip": "已从之前相同歌词的处理记录中恢复 —— 未产生 AI 费用。"
}
},
"instrumentalReview": {
@@ -50,6 +50,18 @@ def create_encoding_worker_vms(
image=custom_image,
size=DiskSizes.ENCODING_WORKER,
type="hyperdisk-balanced",
# NOTE: Hyperdisk provisioned IOPS/throughput are deliberately
# NOT set here. Specifying them forces a full VM *replacement*
# (the provider treats boot-disk init params as immutable), and
# recreating a primary depends on us-central1-c capacity — the
# exact shortage the fallback fleet exists to absorb. So the
# disks are pinned to the Hyperdisk Balanced free baseline
# (3000 IOPS / 140 MB/s) live via `gcloud compute disks update`
# instead — non-disruptive, and pulumi does not manage this
# attribute so there is no drift. They were over-provisioned at
# 3600 IOPS / 290 MB/s (~$8.70/disk/mo wasted). Re-apply the
# gcloud tune after any worker-image rebuild that recreates the
# disks. See docs/archive/2026-06-14-gcp-cost-reduction-plan.md.
),
),
network_interfaces=[compute.InstanceNetworkInterfaceArgs(
@@ -127,6 +139,18 @@ def create_encoding_worker_fallback_vms(
image=custom_image,
size=DiskSizes.ENCODING_WORKER,
type="hyperdisk-balanced",
# NOTE: Hyperdisk provisioned IOPS/throughput are deliberately
# NOT set here. Specifying them forces a full VM *replacement*
# (the provider treats boot-disk init params as immutable), and
# recreating a primary depends on us-central1-c capacity — the
# exact shortage the fallback fleet exists to absorb. So the
# disks are pinned to the Hyperdisk Balanced free baseline
# (3000 IOPS / 140 MB/s) live via `gcloud compute disks update`
# instead — non-disruptive, and pulumi does not manage this
# attribute so there is no drift. They were over-provisioned at
# 3600 IOPS / 290 MB/s (~$8.70/disk/mo wasted). Re-apply the
# gcloud tune after any worker-image rebuild that recreates the
# disks. See docs/archive/2026-06-14-gcp-cost-reduction-plan.md.
),
),
network_interfaces=[compute.InstanceNetworkInterfaceArgs(
@@ -1,11 +1,36 @@
"""Firestore export to GCS staging bucket."""
import logging
from google.cloud import firestore_admin_v1
from google.cloud import firestore_admin_v1, storage
logger = logging.getLogger(__name__)
def _clear_prior_exports(staging_bucket: str, keep_date: str) -> None:
"""Delete prior firestore/ exports in staging except the keep_date one.
The Firestore export runs nightly to provide a fresh daily local (GCS)
restore point, but is only uploaded to S3 weekly (to cut egress). On
non-weekly days the export is held back from S3 and left in staging, so
without this cleanup a week of exports would pile up and the weekly upload
would ship all of them at once — defeating the saving. Keeping only the
latest export means the weekly upload ships exactly one.
"""
keep_prefix = f"firestore/{keep_date}"
try:
client = storage.Client()
bucket = client.bucket(staging_bucket)
for blob in bucket.list_blobs(prefix="firestore/"):
if not blob.name.startswith(keep_prefix):
try:
blob.delete()
except Exception as e:
logger.warning(f"Failed to delete stale firestore export {blob.name}: {e}")
except Exception as e:
# Best-effort cleanup — the export already succeeded, so never fail on it.
logger.warning(f"Failed to list/clear prior firestore exports: {e}")
def export_firestore(project: str, staging_bucket: str, date_str: str) -> str:
"""Export all Firestore collections to GCS.
@@ -32,5 +57,8 @@ def export_firestore(project: str, staging_bucket: str, date_str: str) -> str:
result = operation.result(timeout=1800) # 30 min timeout
# Keep only this export in staging so the weekly S3 upload ships exactly one.
_clear_prior_exports(staging_bucket, date_str)
logger.info(f"Firestore export complete: {output_uri}")
return f"Exported to {output_uri} ({date_str})"
+16 -4
View File
@@ -2,14 +2,18 @@
Backup to AWS Cloud Function.
Nightly backup pipeline:
1. Firestore export to GCS staging
1. Firestore export to GCS staging (nightly; uploaded to S3 weekly on Sundays)
2. BigQuery export to GCS staging (weekly/monthly schedule)
3. GCS job files delta sync to staging
4. Secret Manager export (encrypted with sealed-box public key) to staging
5. Upload staging files to S3
5. Upload staging files to S3 (Firestore export held back except Sundays)
6. Discord alert
Triggered by Cloud Scheduler at 1:00 AM ET daily.
Firestore is the bulk of the cross-cloud egress. Exporting it nightly to GCS
keeps a 1-day local restore point, while uploading to S3 only weekly keeps a
1-week off-site RPO at ~1/7th the egress cost.
"""
import datetime
@@ -59,7 +63,13 @@ def backup_to_aws(request):
results = {}
errors = []
logger.info(f"Starting backup for {date_str}")
# The Firestore export runs nightly (daily local restore point in GCS) but
# is only pushed off-site to S3 weekly, on Sundays — matching the BigQuery
# weekly cadence. This is the bulk of the cross-cloud egress, so weekly
# off-site keeps a 1-week off-site RPO while a 1-day local RPO is retained.
firestore_to_s3_today = today.weekday() == 6 # Sunday
logger.info(f"Starting backup for {date_str} (firestore->S3: {firestore_to_s3_today})")
# Step 1: Firestore export (nightly)
try:
@@ -123,11 +133,13 @@ def backup_to_aws(request):
logger.error(f"Secrets export failed: {e}")
errors.append(f"Secrets: {e}")
# Step 5: Upload to S3
# Step 5: Upload to S3. On non-Sundays, hold the Firestore export back
# (it stays in GCS staging as a daily local backup); it ships to S3 weekly.
try:
results["s3_upload"] = upload_staging_to_s3(
staging_bucket=STAGING_BUCKET,
s3_bucket=S3_BUCKET,
exclude_prefixes=[] if firestore_to_s3_today else ["firestore/"],
)
except Exception as e:
logger.error(f"S3 upload failed: {e}")
@@ -21,12 +21,20 @@ def upload_staging_to_s3(
staging_bucket: str,
s3_bucket: str,
project: str = "nomadkaraoke",
exclude_prefixes: list | None = None,
) -> str:
"""Upload all objects in staging bucket to S3 using streaming.
Walks the staging bucket and uploads each object to the corresponding
S3 key path. Skips marker files (.*).
S3 key path. Skips marker files (.*) and any object whose name starts with
one of ``exclude_prefixes`` (used to hold the nightly Firestore export back
from S3 on non-weekly days — it stays in GCS staging as a daily local
restore point and is uploaded only on the weekly run).
Excluded objects are left in staging (not deleted), so they remain a local
backup until the GCS lifecycle policy or the next weekly upload removes them.
"""
exclude_prefixes = exclude_prefixes or []
aws_creds = get_aws_credentials(project)
s3_client = boto3.client(
"s3",
@@ -45,6 +53,9 @@ def upload_staging_to_s3(
if blob.name.startswith(".") or "/.last_sync" in blob.name:
continue
if any(blob.name.startswith(p) for p in exclude_prefixes):
continue
try:
with blob.open("rb") as gcs_file:
s3_client.upload_fileobj(
@@ -5,8 +5,9 @@ from unittest.mock import MagicMock, patch
class TestFirestoreExport(unittest.TestCase):
@patch("firestore_export.storage.Client")
@patch("firestore_export.firestore_admin_v1.FirestoreAdminClient")
def test_export_firestore_calls_api(self, mock_client_class):
def test_export_firestore_calls_api(self, mock_client_class, mock_storage):
from firestore_export import export_firestore
mock_client = MagicMock()
@@ -14,6 +15,7 @@ class TestFirestoreExport(unittest.TestCase):
mock_operation = MagicMock()
mock_operation.result.return_value = MagicMock()
mock_client.export_documents.return_value = mock_operation
mock_storage.return_value.bucket.return_value.list_blobs.return_value = []
result = export_firestore(
project="test-project",
@@ -27,8 +29,9 @@ class TestFirestoreExport(unittest.TestCase):
assert request["name"] == "projects/test-project/databases/(default)"
assert "gs://test-staging/firestore/2026-03-29" in request["output_uri_prefix"]
@patch("firestore_export.storage.Client")
@patch("firestore_export.firestore_admin_v1.FirestoreAdminClient")
def test_export_firestore_returns_summary(self, mock_client_class):
def test_export_firestore_returns_summary(self, mock_client_class, mock_storage):
from firestore_export import export_firestore
mock_client = MagicMock()
@@ -36,11 +39,44 @@ class TestFirestoreExport(unittest.TestCase):
mock_operation = MagicMock()
mock_operation.result.return_value = MagicMock()
mock_client.export_documents.return_value = mock_operation
mock_storage.return_value.bucket.return_value.list_blobs.return_value = []
result = export_firestore("proj", "bucket", "2026-03-29")
assert isinstance(result, str)
assert "2026-03-29" in result
class TestClearPriorExports(unittest.TestCase):
@patch("firestore_export.storage.Client")
def test_keeps_latest_deletes_others(self, mock_storage):
from firestore_export import _clear_prior_exports
def _blob(name):
b = MagicMock()
b.name = name
return b
today = _blob("firestore/2026-03-29/out.bin")
old1 = _blob("firestore/2026-03-22/out.bin")
old2 = _blob("firestore/2026-03-15/out.bin")
mock_storage.return_value.bucket.return_value.list_blobs.return_value = [
today, old1, old2,
]
_clear_prior_exports("staging", "2026-03-29")
today.delete.assert_not_called()
old1.delete.assert_called_once()
old2.delete.assert_called_once()
@patch("firestore_export.storage.Client")
def test_cleanup_failure_is_swallowed(self, mock_storage):
from firestore_export import _clear_prior_exports
mock_storage.return_value.bucket.return_value.list_blobs.side_effect = RuntimeError("boom")
# Must not raise — cleanup is best-effort, the export already succeeded.
_clear_prior_exports("staging", "2026-03-29")
if __name__ == "__main__":
unittest.main()
@@ -0,0 +1,52 @@
"""Tests for s3_upload module, focused on the exclude_prefixes behavior."""
import unittest
from unittest.mock import MagicMock, patch
def _blob(name):
b = MagicMock()
b.name = name
return b
class TestUploadStagingToS3(unittest.TestCase):
@patch("s3_upload.boto3.client")
@patch("s3_upload.storage.Client")
@patch("s3_upload.get_aws_credentials")
def test_excluded_prefix_not_uploaded_or_deleted(self, mock_creds, mock_storage, mock_boto):
from s3_upload import upload_staging_to_s3
mock_creds.return_value = {"access_key_id": "x", "secret_access_key": "y"}
fs = _blob("firestore/2026-03-29/out.bin")
sec = _blob("secrets/2026-03-29.bin")
mock_storage.return_value.bucket.return_value.list_blobs.return_value = [fs, sec]
upload_staging_to_s3("staging", "s3b", exclude_prefixes=["firestore/"])
# firestore held back: not uploaded, not deleted (stays as local backup)
fs.delete.assert_not_called()
# secrets uploaded then deleted
sec.delete.assert_called_once()
self.assertEqual(mock_boto.return_value.upload_fileobj.call_count, 1)
@patch("s3_upload.boto3.client")
@patch("s3_upload.storage.Client")
@patch("s3_upload.get_aws_credentials")
def test_no_exclude_uploads_everything(self, mock_creds, mock_storage, mock_boto):
from s3_upload import upload_staging_to_s3
mock_creds.return_value = {"access_key_id": "x", "secret_access_key": "y"}
fs = _blob("firestore/2026-03-29/out.bin")
sec = _blob("secrets/2026-03-29.bin")
mock_storage.return_value.bucket.return_value.list_blobs.return_value = [fs, sec]
upload_staging_to_s3("staging", "s3b")
self.assertEqual(mock_boto.return_value.upload_fileobj.call_count, 2)
fs.delete.assert_called_once()
sec.delete.assert_called_once()
if __name__ == "__main__":
unittest.main()
@@ -15,10 +15,22 @@ Provides search and cross-reference endpoints for the KJ Controller:
POST / {"action": "download_url", "file_id": "abc123"}
→ Generate a signed Google Drive download URL
POST / {"action": "refresh", "token": "..."}
→ On-demand "refresh now": force-run the divebar scheduler jobs
(Drive→BigQuery index, Drive→GCS file sync, xref rebuild) so a track
just published to the Nomad Drive shows up without waiting for the
nightly 2/3/6 AM runs. Token-gated (shared bearer) since the endpoint
is otherwise public.
Environment variables:
GCP_PROJECT_ID: GCP project ID
GCP_REGION: region the divebar scheduler jobs live in (for `refresh`)
DIVEBAR_REFRESH_SECRET_ID: Secret Manager secret holding the `refresh` bearer
token (read at runtime, so the function deploys before the secret has a
value — it just returns 403 until one is added)
"""
import hmac
import json
import logging
import os
@@ -32,7 +44,17 @@ logging.basicConfig(level=logging.INFO, format="%(levelname)s %(name)s: %(messag
logger = logging.getLogger(__name__)
GCP_PROJECT_ID = os.environ.get("GCP_PROJECT_ID", "nomadkaraoke")
GCP_REGION = os.environ.get("GCP_REGION", "us-central1")
DATASET = "karaoke_decide"
REFRESH_SECRET_ID = os.environ.get("DIVEBAR_REFRESH_SECRET_ID", "divebar-refresh-token")
# Cloud Scheduler jobs the `refresh` action force-runs, in pipeline order.
# Each carries its own OIDC identity/target, so we only need run permission.
REFRESH_SCHEDULER_JOBS = [
"divebar-mirror-daily", # Drive -> BigQuery index (track first appears)
"divebar-sync-vm-daily", # Drive -> GCS file sync (upgrades to fast URL)
"divebar-xref-rebuild-daily", # KN <-> Divebar cross-reference rebuild
]
def _json_response(data: dict, status: int = 200):
@@ -379,6 +401,68 @@ def _get_full_stats() -> dict:
}
def _get_expected_token() -> str:
"""Read the refresh bearer token from Secret Manager (latest version).
Read at call time rather than injected as an env var so the function can be
deployed before the secret has any version — until one is added this returns
"" and the gate below rejects every request. Returns "" on any access error
(missing secret/version, no permission) so failures fail closed.
"""
from google.cloud import secretmanager
name = f"projects/{GCP_PROJECT_ID}/secrets/{REFRESH_SECRET_ID}/versions/latest"
try:
client = secretmanager.SecretManagerServiceClient()
resp = client.access_secret_version(name=name)
return resp.payload.data.decode("utf-8").strip()
except Exception as e:
logger.warning("Could not read refresh token secret: %s", e)
return ""
def _refresh(token: str) -> dict:
"""Force-run the divebar pipeline scheduler jobs on demand.
Validates the shared bearer token (from Secret Manager), then triggers each
job in REFRESH_SCHEDULER_JOBS via the Cloud Scheduler API. Jobs run
asynchronously under their own identities; this returns as soon as they're
queued.
Returns {"triggered": [...]} on success. Raises PermissionError on a
bad/missing token.
"""
expected = _get_expected_token()
# Constant-time compare; also reject when the token isn't configured so a
# function deployed before the secret has a value can't be bypassed.
if not expected or not token or not hmac.compare_digest(str(token), expected):
raise PermissionError("invalid or missing refresh token")
from google.cloud import scheduler_v1
client = scheduler_v1.CloudSchedulerClient()
triggered, failed = [], []
for job in REFRESH_SCHEDULER_JOBS:
job_path = f"projects/{GCP_PROJECT_ID}/locations/{GCP_REGION}/jobs/{job}"
try:
client.run_job(name=job_path)
triggered.append(job)
except Exception as e:
# Best-effort: one job failing (e.g. already running) shouldn't
# block the others. Surface it so callers can see partial success.
logger.warning("Failed to run scheduler job %s: %s", job, e)
failed.append({"job": job, "error": str(e)})
return {
"triggered": triggered,
"failed": failed,
# The mirror/sync jobs run async (index ~minutes, GCS sync up to ~1h);
# the catalog reflects a newly-published track once the mirror index
# completes. xref fully reflects new tracks after the next mirror run.
"note": "Jobs queued. New tracks appear after the mirror index completes (~minutes).",
}
@functions_framework.http
def divebar_lookup(request):
"""HTTP Cloud Function entry point."""
@@ -434,6 +518,14 @@ def divebar_lookup(request):
stats = _get_full_stats()
return _json_response({"status": "ok", **stats})
elif action == "refresh":
try:
result = _refresh(body.get("token", ""))
except PermissionError:
# Don't leak whether the token exists; uniform 403.
return _json_response({"status": "error", "message": "forbidden"}, 403)
return _json_response({"status": "ok", **result})
else:
return _json_response({"status": "error", "message": f"Unknown action: {action}"}, 400)
@@ -4,5 +4,12 @@ google-cloud-bigquery>=3.13.0
# Cloud Storage (for signed download URLs)
google-cloud-storage>=2.13.0
# Cloud Scheduler (for the on-demand `refresh` action — force-runs the
# divebar mirror/sync/xref scheduler jobs)
google-cloud-scheduler>=2.13.0
# Secret Manager (reads the `refresh` action's bearer token at runtime)
google-cloud-secret-manager>=2.16.0
# Cloud Functions framework
functions-framework>=3.0.0
@@ -0,0 +1,139 @@
"""
Tests for divebar_lookup/main.py — focused on the on-demand `refresh` action.
`refresh` force-runs the divebar pipeline scheduler jobs (mirror index, GCS
file sync, xref rebuild) so a just-published track shows up without waiting for
the nightly runs. The endpoint is otherwise public, so the action is gated by a
shared bearer token (constant-time compare).
"""
import os
import sys
import json
from unittest.mock import MagicMock
import pytest
# Stub out Cloud Function deps that aren't installed in the test env. The
# scheduler/secret clients are imported lazily inside the refresh helpers, so
# stub them here too. functions_framework.http must be an identity decorator so
# the real entry point stays callable (a bare MagicMock would replace it).
_functions_framework = MagicMock()
_functions_framework.http = lambda fn: fn
_scheduler_mod = MagicMock()
for name, mod in (
("functions_framework", _functions_framework),
("google.cloud.bigquery", MagicMock()),
("google.cloud.storage", MagicMock()),
("google.cloud.scheduler_v1", _scheduler_mod),
("google.cloud.secretmanager", MagicMock()),
):
sys.modules.setdefault(name, mod)
sys.path.insert(0, os.path.dirname(__file__))
import main # noqa: E402
TOKEN = "s3cret-refresh-token"
@pytest.fixture(autouse=True)
def _reset_scheduler(monkeypatch):
"""Fresh scheduler client mock + a configured token (read from Secret
Manager at runtime, mocked here) for each test."""
monkeypatch.setattr(main, "_get_expected_token", lambda: TOKEN)
client = MagicMock()
_scheduler_mod.CloudSchedulerClient = MagicMock(return_value=client)
yield client
class MockRequest:
def __init__(self, body, method="POST"):
self.method = method
self._body = body
def get_json(self, silent=False):
return self._body
# ---------------------------------------------------------------------------
# _refresh — token gate
# ---------------------------------------------------------------------------
class TestRefreshTokenGate:
def test_wrong_token_raises(self, _reset_scheduler):
with pytest.raises(PermissionError):
main._refresh("nope")
_reset_scheduler.run_job.assert_not_called()
def test_empty_token_raises(self, _reset_scheduler):
with pytest.raises(PermissionError):
main._refresh("")
_reset_scheduler.run_job.assert_not_called()
def test_unconfigured_server_token_raises(self, monkeypatch, _reset_scheduler):
# Secret has no value yet (read returns "") — even if the caller sends a
# token, an unconfigured server rejects it (fails closed).
monkeypatch.setattr(main, "_get_expected_token", lambda: "")
with pytest.raises(PermissionError):
main._refresh("anything")
_reset_scheduler.run_job.assert_not_called()
# ---------------------------------------------------------------------------
# _refresh — job triggering
# ---------------------------------------------------------------------------
class TestRefreshTriggers:
def test_runs_all_pipeline_jobs_in_order(self, _reset_scheduler):
result = main._refresh(TOKEN)
assert result["triggered"] == main.REFRESH_SCHEDULER_JOBS
assert result["failed"] == []
# Each job referenced by its full path in the configured region.
called_paths = [c.kwargs["name"] for c in _reset_scheduler.run_job.call_args_list]
assert called_paths == [
f"projects/{main.GCP_PROJECT_ID}/locations/{main.GCP_REGION}/jobs/{j}"
for j in main.REFRESH_SCHEDULER_JOBS
]
def test_one_job_failing_does_not_block_others(self, _reset_scheduler):
# First job raises (e.g. already running); the rest still fire.
_reset_scheduler.run_job.side_effect = [
RuntimeError("already running"), None, None,
]
result = main._refresh(TOKEN)
assert result["triggered"] == main.REFRESH_SCHEDULER_JOBS[1:]
assert len(result["failed"]) == 1
assert result["failed"][0]["job"] == main.REFRESH_SCHEDULER_JOBS[0]
# ---------------------------------------------------------------------------
# divebar_lookup dispatch — refresh action
# ---------------------------------------------------------------------------
class TestRefreshDispatch:
def test_good_token_returns_200(self, _reset_scheduler):
body, status, _ = main.divebar_lookup(
MockRequest({"action": "refresh", "token": TOKEN})
)
assert status == 200
payload = json.loads(body)
assert payload["status"] == "ok"
assert payload["triggered"] == main.REFRESH_SCHEDULER_JOBS
def test_bad_token_returns_403_uniform_message(self, _reset_scheduler):
body, status, _ = main.divebar_lookup(
MockRequest({"action": "refresh", "token": "wrong"})
)
assert status == 403
payload = json.loads(body)
assert payload["status"] == "error"
# Uniform message — doesn't leak whether the token is configured.
assert payload["message"] == "forbidden"
_reset_scheduler.run_job.assert_not_called()
def test_missing_token_returns_403(self, _reset_scheduler):
body, status, _ = main.divebar_lookup(MockRequest({"action": "refresh"}))
assert status == 403
_reset_scheduler.run_job.assert_not_called()
@@ -370,9 +370,14 @@ def create_ephemeral_runner(labels: Iterable[str], pat: str) -> dict:
last_error: Exception | None = None
for zone in zones:
use_external_ip = (
family.needs_external_ip_in_fallback_zone and zone != PRIMARY_ZONE
)
# Always attach an ephemeral external IP so runner egress (Docker
# pulls, dependency downloads) leaves via the VM's own IP and bypasses
# the Cloud NAT data-processing charge (~$26/mo — runners were the
# NAT's only user). Ephemeral IPs are free while attached to a running
# VM, runners are short-lived, and us-central1 has ample IN_USE_ADDRESSES
# quota (limit 69). Supersedes the prior fallback-zone-only logic;
# `needs_external_ip_in_fallback_zone` is retained for documentation.
use_external_ip = True
instance = _build_instance(
name=runner_name,
family=family,
@@ -164,7 +164,9 @@ class TestCreateEphemeralRunner:
assert result["family"] == "general"
assert result["zone"] == "us-central1-a"
assert result["external_ip"] is False
# All runners now get an ephemeral external IP to bypass the Cloud NAT
# data-processing charge (runners were the NAT's only user).
assert result["external_ip"] is True
assert result["runner_name"].startswith("gha-general-")
compute_client.insert.assert_called_once()
@@ -24,6 +24,27 @@ def create_repository() -> artifactregistry.Repository:
location=REGION,
format="DOCKER",
description="Docker repository for karaoke backend images",
# Cost control: keep the 10 most recent versions for rollback, and
# delete untagged digests older than 7 days (orphaned layers left by
# repeated :latest pushes). Tagged images are never auto-deleted.
cleanup_policies=[
artifactregistry.RepositoryCleanupPolicyArgs(
id="keep-recent-10",
action="KEEP",
most_recent_versions=artifactregistry.RepositoryCleanupPolicyMostRecentVersionsArgs(
keep_count=10,
),
),
artifactregistry.RepositoryCleanupPolicyArgs(
id="delete-untagged-after-7d",
action="DELETE",
condition=artifactregistry.RepositoryCleanupPolicyConditionArgs(
tag_state="UNTAGGED",
older_than="604800s", # 7 days
),
),
],
cleanup_policy_dry_run=False,
)
return artifact_repo
@@ -30,6 +30,27 @@ def create_audio_separator_artifact_repo() -> artifactregistry.Repository:
location=AUDIO_SEPARATOR_REGION,
format="DOCKER",
description="Docker repository for audio-separator GPU service",
# Cost control: audio-separator images bake ~14GB of models. Keep 10
# most recent versions for rollback; delete untagged digests older
# than 7 days.
cleanup_policies=[
artifactregistry.RepositoryCleanupPolicyArgs(
id="keep-recent-10",
action="KEEP",
most_recent_versions=artifactregistry.RepositoryCleanupPolicyMostRecentVersionsArgs(
keep_count=10,
),
),
artifactregistry.RepositoryCleanupPolicyArgs(
id="delete-untagged-after-7d",
action="DELETE",
condition=artifactregistry.RepositoryCleanupPolicyConditionArgs(
tag_state="UNTAGGED",
older_than="604800s", # 7 days
),
),
],
cleanup_policy_dry_run=False,
)
+43
View File
@@ -115,11 +115,27 @@ def create_divebar_lookup_resources(all_secrets: dict) -> dict:
service_account_email=sa.email,
environment_variables={
"GCP_PROJECT_ID": PROJECT_ID,
# Region the divebar scheduler jobs live in — the `refresh`
# action builds job paths from it to run them on demand.
"GCP_REGION": REGION,
# Secret holding the `refresh` bearer token. Read at runtime
# (not injected as a secret env var) so the function deploys
# cleanly before the secret has a version — it just returns 403
# until one is added. Avoids a deploy-ordering gotcha.
"DIVEBAR_REFRESH_SECRET_ID": all_secrets["divebar-refresh-token"].secret_id,
},
),
)
resources["function"] = function
# Allow the function SA to read the refresh-token secret at runtime.
resources["refresh_token_accessor"] = gcp.secretmanager.SecretIamMember(
"divebar-lookup-refresh-token-accessor",
secret_id=all_secrets["divebar-refresh-token"].secret_id,
role="roles/secretmanager.secretAccessor",
member=sa.email.apply(lambda email: f"serviceAccount:{email}"),
)
# ==================== IAM: Allow unauthenticated access ====================
# The KJ Controller calls this from a LAN device without GCP credentials.
# The function only reads from BigQuery (no write to external resources).
@@ -189,4 +205,31 @@ def create_divebar_lookup_resources(all_secrets: dict) -> dict:
),
)
# ==================== IAM: on-demand scheduler-job runner ====================
# The `refresh` action forces the existing divebar scheduler jobs
# (mirror index, file-sync VM start, xref rebuild) to run immediately,
# reusing their own OIDC identities and targets. The function SA therefore
# only needs permission to *run* those jobs — not to invoke the mirror
# function or start the VM directly. Least-privilege custom role rather than
# the broad roles/cloudscheduler.admin.
scheduler_runner_role = gcp.projects.IAMCustomRole(
"divebar-scheduler-runner-role",
role_id="divebarSchedulerRunner",
title="Divebar Scheduler Job Runner",
description="Run (force-trigger) Divebar Cloud Scheduler jobs on demand",
permissions=[
"cloudscheduler.jobs.run",
"cloudscheduler.jobs.get",
],
)
resources["scheduler_runner_role"] = scheduler_runner_role
resources["scheduler_runner_binding"] = gcp.projects.IAMMember(
"divebar-lookup-scheduler-runner",
project=PROJECT_ID,
role=scheduler_runner_role.id,
member=sa.email.apply(lambda email: f"serviceAccount:{email}"),
)
return resources
@@ -21,4 +21,24 @@ def create_gpu_artifact_repo() -> artifactregistry.Repository:
location=GPU_REGION,
format="DOCKER",
description="Docker repository for GPU-enabled karaoke-backend images (audio worker)",
# Cost control: GPU images are multi-GB. Keep 10 most recent versions
# for rollback; delete untagged digests older than 7 days.
cleanup_policies=[
artifactregistry.RepositoryCleanupPolicyArgs(
id="keep-recent-10",
action="KEEP",
most_recent_versions=artifactregistry.RepositoryCleanupPolicyMostRecentVersionsArgs(
keep_count=10,
),
),
artifactregistry.RepositoryCleanupPolicyArgs(
id="delete-untagged-after-7d",
action="DELETE",
condition=artifactregistry.RepositoryCleanupPolicyConditionArgs(
tag_state="UNTAGGED",
older_than="604800s", # 7 days
),
),
],
cleanup_policy_dry_run=False,
)
+6
View File
@@ -68,6 +68,12 @@ def create_secrets() -> dict[str, secretmanager.Secret]:
# Notifications (Discord)
"discord-alert-webhook",
# Divebar on-demand refresh trigger (shared bearer token: kjbox's
# "Refresh catalog" button -> divebar-lookup `refresh` action). Gates
# an otherwise-public endpoint that re-runs the mirror/sync/xref
# scheduler jobs on demand, so it's anti-abuse, not data-sensitive.
"divebar-refresh-token",
]
secrets = {}
+45 -7
View File
@@ -129,18 +129,56 @@ Notification channels are managed as Pulumi IaC in
attached to every alert policy.
**Current channel:** one email channel (`alerts-email`) delivering to the
project owner. Cloud Monitoring puts new email channels in PENDING state and
sends a one-time confirmation link to the address; the channel stays inactive
until the link is clicked.
project owner.
If alerts seem to be firing but not delivering, check:
### Gotcha: Pulumi-created email channels don't auto-send the verification email
When an email channel is created through the **Cloud Console**, Cloud Monitoring
automatically sends a verification link to the address. When it's created
through the **API or Pulumi**, that auto-send does **not** happen — the channel
lands in `verificationStatus=UNVERIFIED` and stays there silently. Alerts will
fire and resolve but no email gets delivered.
After `pulumi up` creates a new email channel, trigger the verification email
explicitly:
```bash
gcloud alpha monitoring channels list --project=nomadkaraoke \
--format='table(displayName,type,verificationStatus,enabled)'
unset GOOGLE_APPLICATION_CREDENTIALS # need admin creds, not claude-readonly
CHANNEL_ID=$(gcloud alpha monitoring channels list --project=nomadkaraoke \
--filter='type=email AND displayName="Andrew (email)"' \
--format='value(name.basename())')
curl -sS -X POST -d '{}' \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "Content-Type: application/json" \
"https://monitoring.googleapis.com/v3/projects/nomadkaraoke/notificationChannels/${CHANNEL_ID}:sendVerificationCode"
```
`verificationStatus=VERIFIED` is the active state.
The email arrives within a minute or two. Subject is something like
"Verify your email address for Google Cloud Alerting" and the body contains
a code in the form `G-NNNNNN` plus a clickable link. Either path completes
the verification — clicking the link is simplest, or POST the code to
`:verify`:
```bash
curl -sS -X POST -d '{"code":"G-NNNNNN"}' \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "Content-Type: application/json" \
"https://monitoring.googleapis.com/v3/projects/nomadkaraoke/notificationChannels/${CHANNEL_ID}:verify"
```
Confirm afterwards:
```bash
curl -sS -H "Authorization: Bearer $(gcloud auth print-access-token)" \
"https://monitoring.googleapis.com/v3/projects/nomadkaraoke/notificationChannels/${CHANNEL_ID}" \
| python3 -c "import json,sys; print(json.load(sys.stdin).get('verificationStatus','(missing)'))"
```
Expected output: `VERIFIED`. Until that's true, `gcloud alpha monitoring
channels list --format='table(...,verificationStatus,...)'` returns an
empty `verificationStatus` column (which is itself a tell — verified
channels populate the field).
### Adding a second channel (e.g. Discord)
@@ -29,6 +29,11 @@ AUDIOSHAKE_SUPPORTED = AUDIOSHAKE_SUPPORTED_AUDIO | AUDIOSHAKE_SUPPORTED_VIDEO
# Uncompressed formats that benefit from FLAC conversion (smaller upload)
UNCOMPRESSED_FORMATS = {'.wav', '.aiff', '.aif', '.pcm'}
# Compressed audio formats where leading 0x00 bytes are unambiguous garbage (the real
# audio starts at an ID3 tag or MPEG/ADTS frame sync). Container formats like .mp4/.mov
# legitimately begin with null bytes (box-size prefix) and must NOT be treated this way.
LEADING_PADDING_PRONE = {'.mp3', '.aac', '.mp4a'}
class AudioUploadOptimizer:
"""Optimizes audio files for upload by converting uncompressed formats to FLAC."""
@@ -57,8 +62,14 @@ class AudioUploadOptimizer:
self.logger.info("Stripping metadata from FLAC before upload (audio unchanged)")
return self._strip_metadata(filepath)
# Other AudioShake-supported formats: upload directly
# Other AudioShake-supported formats: upload directly, unless the file has leading
# null-byte padding that AudioShake's asset processing rejects (see below).
if ext in AUDIOSHAKE_SUPPORTED:
if ext in LEADING_PADDING_PRONE and self._has_leading_padding(filepath):
self.logger.info(
f"Leading padding detected in {ext}; remuxing losslessly before upload"
)
return self._remux_clean(filepath, ext)
self.logger.info(f"Uploading AudioShake-supported format ({ext}) directly")
return filepath, None
@@ -91,6 +102,46 @@ class AudioUploadOptimizer:
self.logger.info(f"Stripped metadata from {os.path.basename(filepath)}")
return clean_path, clean_path
def _has_leading_padding(self, filepath: str) -> bool:
"""Return True if the file begins with a null byte (leading padding).
Some user-provided files (notably certain karaoke production exports, e.g. the
Vocal Star bulk batch) carry a block of leading 0x00 bytes before the first ID3
tag / MPEG frame sync. ffmpeg tolerates this, but AudioShake's asset processing
rejects it with "Error fetching or processing asset". Such files must be remuxed
before upload. Only call this for LEADING_PADDING_PRONE formats — container
formats begin with null bytes legitimately.
"""
try:
with open(filepath, "rb") as f:
return f.read(1) == b"\x00"
except OSError:
return False
def _remux_clean(self, filepath: str, ext: str) -> Tuple[str, str]:
"""Losslessly remux audio to strip leading padding that breaks AudioShake.
Uses ffmpeg stream copy (no re-encode, no quality loss); ffmpeg's demuxer skips
the leading garbage and writes only valid frames, so the output starts cleanly.
"""
with tempfile.NamedTemporaryFile(suffix=ext, delete=False) as temp_file:
clean_path = temp_file.name
try:
subprocess.run(
["ffmpeg", "-i", filepath, "-map", "0:a", "-c", "copy", "-map_metadata", "-1", clean_path, "-y"],
check=True,
capture_output=True,
)
except subprocess.CalledProcessError as e:
if os.path.exists(clean_path):
os.unlink(clean_path)
self.logger.error(f"ffmpeg remux failed: {e.stderr.decode()}")
raise
self.logger.info(f"Remuxed {os.path.basename(filepath)} to strip leading padding")
return clean_path, clean_path
def _convert_to_flac(self, filepath: str) -> Tuple[str, str]:
"""Convert audio file to FLAC format."""
ext = os.path.splitext(filepath)[1].lower()
+1 -1
View File
@@ -1,6 +1,6 @@
[tool.poetry]
name = "karaoke-gen"
version = "0.179.0"
version = "0.183.4"
description = "Generate karaoke videos with synchronized lyrics. Handles the entire process from downloading audio and lyrics to creating the final video with title screens."
authors = ["Andrew Beveridge <andrew@beveridge.uk>"]
license = "MIT"
+195
View File
@@ -0,0 +1,195 @@
#!/usr/bin/env python3
"""
Production end-to-end health check for a white-label tenant portal.
Drives the exact path a tenant uses: submit a job with X-Tenant-ID + the tenant's own
mixed/instrumental audio, let it transcribe, approve the lyrics review, wait for the
render, and assert the tenant distribution was applied (locked theme, no YouTube, no
Google Drive, Dropbox folder + downloadable outputs). Cleans up the job and its uploads.
Designed to run daily per tenant in GitHub Actions (see .github/workflows/e2e-tenant-daily.yml)
and locally for ad-hoc verification.
Auth / credentials:
- Admin token: env KARAOKE_ADMIN_TOKEN, else Secret Manager (admin-tokens) via ADC.
- Test audio + cleanup: Google Cloud Storage via ADC.
In CI these are provided by Workload Identity Federation (google-github-actions/auth).
Usage:
python scripts/e2e/tenant_e2e.py vocalstar
python scripts/e2e/tenant_e2e.py singa
"""
import os
import sys
import time
import json
import tempfile
import urllib.request
import urllib.error
API = os.environ.get("KARAOKE_API_URL", "https://api.nomadkaraoke.com")
BUCKET = os.environ.get("KARAOKE_GCS_BUCKET", "karaoke-gen-storage-nomadkaraoke")
# Shared test pair (real audio with vocals so transcription has something to align).
TEST_MIXED = f"gs://{BUCKET}/e2e-tests/shared/e2e-mixed.mp3"
TEST_INSTRUMENTAL = f"gs://{BUCKET}/e2e-tests/shared/e2e-instrumental.mp3"
# Clearly-labelled so the daily output is identifiable in the tenant's Dropbox folder.
ARTIST = "Nomad Karaoke"
TITLE = "E2E Health Check"
EXPECTED = {
"vocalstar": {"theme": "vocalstar"},
"singa": {"theme": "singa"},
}
REVIEW_TIMEOUT = int(os.environ.get("E2E_REVIEW_TIMEOUT", "900")) # 15 min to transcription/review
RENDER_TIMEOUT = int(os.environ.get("E2E_RENDER_TIMEOUT", "1800")) # 30 min to full render
def log(msg):
print(msg, flush=True)
def admin_token():
tok = os.environ.get("KARAOKE_ADMIN_TOKEN")
if tok:
return tok.split(",")[0].strip()
from google.cloud import secretmanager
c = secretmanager.SecretManagerServiceClient()
resp = c.access_secret_version(request={
"name": "projects/nomadkaraoke/secrets/admin-tokens/versions/latest"})
return resp.payload.data.decode().split(",")[0].strip()
def gcs_download(gs_uri, local_path):
from google.cloud import storage
bucket, _, blob = gs_uri[5:].partition("/")
storage.Client().bucket(bucket).blob(blob).download_to_filename(local_path)
def gcs_delete_prefix(prefix):
from google.cloud import storage
client = storage.Client()
b = client.bucket(BUCKET)
for blob in b.list_blobs(prefix=prefix):
blob.delete()
TENANT = sys.argv[1] if len(sys.argv) > 1 else os.environ.get("E2E_TENANT", "vocalstar")
if TENANT not in EXPECTED:
log(f"Unknown tenant: {TENANT}")
sys.exit(2)
TOKEN = admin_token()
def req(method, path, body=None, timeout=180):
url = path if path.startswith("http") else API + path
data = json.dumps(body).encode() if body is not None else None
headers = {"Authorization": f"Bearer {TOKEN}", "X-Tenant-ID": TENANT}
if data is not None:
headers["Content-Type"] = "application/json"
r = urllib.request.Request(url, data=data, headers=headers, method=method)
try:
with urllib.request.urlopen(r, timeout=timeout) as resp:
raw = resp.read().decode()
return resp.status, (json.loads(raw) if raw else {})
except urllib.error.HTTPError as e:
return e.code, {"error": e.read().decode()[:400]}
def put_file(signed_url, local_path, content_type):
with open(local_path, "rb") as f:
data = f.read()
r = urllib.request.Request(signed_url, data=data, headers={"Content-Type": content_type}, method="PUT")
with urllib.request.urlopen(r, timeout=600) as resp:
return resp.status
def poll_until(job_id, statuses, timeout, label):
deadline = time.time() + timeout
last = None
while time.time() < deadline:
st, job = req("GET", f"/api/jobs/{job_id}")
s = job.get("status")
if s != last:
log(f" [{time.strftime('%H:%M:%S')}] status={s} progress={job.get('progress')}")
last = s
if s in statuses:
return job
if s in ("failed", "error"):
raise RuntimeError(f"Job failed during {label}: {job.get('error_message')}")
time.sleep(15)
raise TimeoutError(f"Timed out waiting for {label} (last status={last})")
def main():
log(f"=== Tenant E2E health check: {TENANT} ===")
tmp = tempfile.mkdtemp()
mixed = os.path.join(tmp, "mixed.mp3")
instrumental = os.path.join(tmp, "instrumental.mp3")
gcs_download(TEST_MIXED, mixed)
gcs_download(TEST_INSTRUMENTAL, instrumental)
files = [
{"file_type": "audio", "filename": "mixed.mp3", "content_type": "audio/mpeg"},
{"file_type": "existing_instrumental", "filename": "instrumental.mp3", "content_type": "audio/mpeg"},
]
st, resp = req("POST", "/api/jobs/create-with-upload-urls",
{"artist": ARTIST, "title": TITLE, "files": files,
"is_private": True, "existing_instrumental": True})
if st != 200:
raise RuntimeError(f"create failed: {st} {resp}")
job_id = resp["job_id"]
log(f"job_id: {job_id}")
failed = True
try:
urls = {u["file_type"]: u for u in resp["upload_urls"]}
put_file(urls["audio"]["upload_url"], mixed, urls["audio"]["content_type"])
put_file(urls["existing_instrumental"]["upload_url"], instrumental, urls["existing_instrumental"]["content_type"])
req("POST", f"/api/jobs/{job_id}/uploads-complete", {"uploaded_files": ["audio", "existing_instrumental"]})
poll_until(job_id, ("awaiting_review", "in_review"), REVIEW_TIMEOUT, "review gate")
log("approving review")
st, _ = req("POST", f"/api/jobs/{job_id}/complete-review", {})
if st != 200:
raise RuntimeError(f"complete-review failed: {st}")
job = poll_until(job_id, ("complete",), RENDER_TIMEOUT, "render")
# Assertions: tenant distribution applied end-to-end.
sd = job.get("state_data") or {}
dropbox = sd.get("dropbox_link") or job.get("dropbox_link")
youtube = sd.get("youtube_url") or job.get("youtube_url")
downloads = job.get("download_urls") or {}
log(f" dropbox_link: {dropbox}")
log(f" youtube_url: {youtube}")
log(f" download_urls: {sorted(downloads.keys())}")
errors = []
if not dropbox:
errors.append("no dropbox_link (tenant Dropbox distribution did not run)")
if youtube:
errors.append(f"unexpected youtube_url={youtube} (tenant must not publish to YouTube)")
if not downloads:
errors.append("no download_urls (outputs not downloadable from portal)")
if errors:
raise RuntimeError("Assertions failed: " + "; ".join(errors))
log(f"\n✅ {TENANT} E2E PASSED — job completed, Dropbox link present, no YouTube, downloads available")
failed = False
finally:
# Always clean up the test job and its uploads.
try:
req("DELETE", f"/api/jobs/{job_id}")
gcs_delete_prefix(f"uploads/{job_id}/")
gcs_delete_prefix(f"jobs/{job_id}/")
log(f"cleaned up job {job_id}")
except Exception as e:
log(f"cleanup warning: {e}")
if failed:
sys.exit(1)
if __name__ == "__main__":
main()
+323
View File
@@ -0,0 +1,323 @@
#!/usr/bin/env python3
"""
Measure the real token usage and cost of the AI lyrics auto-correct feature
against production jobs.
For each job it loads the stored corrections (the same transcription +
reference lyrics the review UI sends to ``POST /{job_id}/auto-correct``),
rebuilds the exact prompts, calls each configured model once, and reports
input/output/thinking tokens and estimated USD per model — plus a per-track
and aggregate summary. This is the immediate ground-truth read that the
production usage logging (``auto-correct usage`` / ``auto-correct cost`` lines)
accumulates over time.
Usage:
# Auto-pick the N most recent complete jobs that have corrections
python scripts/measure_autocorrect_cost.py --limit 3
# Measure specific jobs
python scripts/measure_autocorrect_cost.py --jobs abc123 def456
# Single-model instead of the multi-model compare config
python scripts/measure_autocorrect_cost.py --limit 3 --models claude-opus-4-8
Requires:
- ANTHROPIC_API_KEY in the environment (for claude-* models)
- GCP creds for Vertex/Firestore/GCS:
gcloud auth application-default login (or GOOGLE_APPLICATION_CREDENTIALS)
- GOOGLE_CLOUD_PROJECT=nomadkaraoke (set automatically below if unset)
NOTE: every run makes real, billed model calls. Gemini USD figures use the
ESTIMATED rates in backend/services/auto_correct/pricing.py — token counts are
exact; verify the Gemini rate before trusting its dollar value.
"""
from __future__ import annotations
import argparse
import json
import logging
import os
import sys
import time
from typing import Optional
os.environ.setdefault("GOOGLE_CLOUD_PROJECT", "nomadkaraoke")
# Running "python scripts/foo.py" puts scripts/ on sys.path, not the repo root,
# so the backend.* imports below would fail. Add the repo root explicitly.
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from google.cloud import firestore, storage # noqa: E402
logging.basicConfig(level=logging.WARNING, format="%(levelname)s %(message)s")
logger = logging.getLogger("measure_autocorrect_cost")
logger.setLevel(logging.INFO)
PROJECT = "nomadkaraoke"
GCS_BUCKET = "karaoke-gen-storage-nomadkaraoke"
DEFAULT_MODELS = ["claude-opus-4-8", "gemini-3.1-pro-preview"]
# ---------------------------------------------------------------------------
# Job + corrections loading
# ---------------------------------------------------------------------------
def _corrections_path(job_data: dict, job_id: str) -> Optional[str]:
"""Mirror review.py: prefer the latest review edits, then the original."""
lyrics = (job_data.get("file_urls") or {}).get("lyrics") or {}
return (
lyrics.get("corrections_updated")
or lyrics.get("corrections")
or f"jobs/{job_id}/lyrics/corrections.json"
)
def fetch_recent_jobs(db: firestore.Client, limit: int) -> list[dict]:
query = (
db.collection("jobs")
.where("status", "==", "complete")
.order_by("created_at", direction=firestore.Query.DESCENDING)
.limit(limit * 4)
)
jobs = []
for doc in query.stream():
data = doc.to_dict()
data["_job_id"] = doc.id
lyrics = (data.get("file_urls") or {}).get("lyrics") or {}
if lyrics.get("corrections") or lyrics.get("corrections_updated"):
jobs.append(data)
if len(jobs) >= limit:
break
return jobs
def fetch_job(db: firestore.Client, job_id: str) -> Optional[dict]:
doc = db.collection("jobs").document(job_id).get()
if not doc.exists:
logger.warning("job %s not found in Firestore", job_id)
return None
data = doc.to_dict()
data["_job_id"] = job_id
return data
def download_corrections(
gcs: storage.Client, path: str
) -> Optional[dict]:
if path.startswith("gs://"):
bucket_name, _, blob_path = path[5:].partition("/")
else:
bucket_name, blob_path = GCS_BUCKET, path
try:
blob = gcs.bucket(bucket_name).blob(blob_path)
if not blob.exists():
return None
return json.loads(blob.download_as_bytes())
except Exception as exc: # noqa: BLE001
logger.warning("failed to read %s: %s", path, exc)
return None
def build_inputs(corrections: dict) -> Optional[tuple[list[dict], dict]]:
"""Return (segments, reference_lyrics) in the shape suggest() expects."""
segments = corrections.get("corrected_segments") or corrections.get("segments") or []
reference_lyrics = corrections.get("reference_lyrics") or {}
if not segments:
logger.warning("no segments in corrections")
return None
if not reference_lyrics:
logger.warning("no reference_lyrics in corrections — auto-correct needs >=1 source")
return None
# The service requires segment + word ids; older jobs may lack them.
for seg in segments:
if not seg.get("id") or any(not w.get("id") for w in (seg.get("words") or [])):
logger.warning("segments missing word/segment ids — skipping job")
return None
return segments, reference_lyrics
# ---------------------------------------------------------------------------
# Measurement
# ---------------------------------------------------------------------------
def measure_job(service, job: dict, gcs, models: list[str]) -> Optional[dict]:
from backend.services.auto_correct.pricing import estimate_cost_usd
from backend.services.auto_correct.prompts import (
build_system_prompt,
build_user_prompt,
)
from backend.services.auto_correct.settings import AutoCorrectSettings
job_id = job["_job_id"]
artist = job.get("artist")
title = job.get("title")
path = _corrections_path(job, job_id)
corrections = download_corrections(gcs, path)
if not corrections:
logger.warning("[%s] no corrections at %s — skipping", job_id, path)
return None
built = build_inputs(corrections)
if not built:
return None
segments, reference_lyrics = built
settings = AutoCorrectSettings()
system_prompt = build_system_prompt(settings)
user_prompt = build_user_prompt(
segments=segments,
reference_lyrics=reference_lyrics,
artist=artist,
title=title,
)
word_count = sum(len(seg.get("words") or []) for seg in segments)
logger.info(
"[%s] %s - %s | %d segments, %d words, %d ref sources",
job_id, artist or "?", title or "?", len(segments), word_count,
len(reference_lyrics),
)
per_model = []
for model in models:
t0 = time.time()
try:
raw, usage = service._call_model(
model, system_prompt, user_prompt, job_id=job_id
)
except Exception as exc: # noqa: BLE001
logger.warning("[%s] model %s failed: %s", job_id, model, exc)
per_model.append({"model": model, "error": str(exc)})
continue
elapsed = time.time() - t0
cost = estimate_cost_usd(model, usage)
n_sugg = len(raw.get("suggestions") or []) if isinstance(raw, dict) else 0
per_model.append({
"model": model,
"usage": usage,
"cost": cost,
"suggestions": n_sugg,
"elapsed": elapsed,
})
if usage:
logger.info(
" %-26s in=%-6d out=%-6d think=%-6s cost=%s (%.1fs, %d suggestions)",
model,
usage.get("input_tokens", 0),
usage.get("output_tokens", 0),
"na" if usage.get("thinking_tokens") is None else usage["thinking_tokens"],
"?" if cost is None else f"${cost:.4f}",
elapsed, n_sugg,
)
else:
logger.info(" %-26s usage unavailable", model)
return {
"job_id": job_id,
"artist": artist,
"title": title,
"word_count": word_count,
"per_model": per_model,
}
def print_report(results: list[dict], models: list[str]) -> None:
print("\n" + "=" * 78)
print("AUTO-CORRECT COST MEASUREMENT")
print("=" * 78)
track_totals = []
model_cost_sums = {m: 0.0 for m in models}
model_cost_known = {m: False for m in models}
for r in results:
track_total = 0.0
any_cost = False
print(f"\n{r['artist'] or '?'} - {r['title'] or '?'} "
f"({r['job_id']}, {r['word_count']} words)")
for pm in r["per_model"]:
if "error" in pm:
print(f" {pm['model']:<26s} ERROR: {pm['error']}")
continue
u = pm["usage"] or {}
cost = pm["cost"]
if cost is not None:
track_total += cost
any_cost = True
model_cost_sums[pm["model"]] += cost
model_cost_known[pm["model"]] = True
print(
f" {pm['model']:<26s} "
f"in={u.get('input_tokens', 0):<6d} "
f"out={u.get('output_tokens', 0):<6d} "
f"think={('na' if u.get('thinking_tokens') is None else u['thinking_tokens'])!s:<6s} "
f"cost={'?' if cost is None else f'${cost:.4f}':<9s} "
f"({pm['suggestions']} suggestions)"
)
print(f" {'TRACK TOTAL':<26s} {'':<26s}"
f"{'$%.4f' % track_total if any_cost else 'unknown'}")
if any_cost:
track_totals.append(track_total)
print("\n" + "-" * 78)
print("AGGREGATE")
print("-" * 78)
for m in models:
if model_cost_known[m]:
avg = model_cost_sums[m] / len(results) if results else 0.0
print(f" {m:<26s} avg ${avg:.4f}/track")
if track_totals:
avg = sum(track_totals) / len(track_totals)
hi = max(track_totals)
print(f"\n Avg total cost/track: ${avg:.4f}")
print(f" Max total cost/track: ${hi:.4f}")
print(f" Jobs measured: {len(track_totals)}")
print(f"\n Projected at 30 jobs/day: ${avg * 30:.2f}/day (~${avg * 30 * 30:.0f}/mo)")
print(f" Projected at 100 jobs/day: ${avg * 100:.2f}/day (~${avg * 100 * 30:.0f}/mo)")
print("\nNOTE: Gemini USD uses ESTIMATED rates (see pricing.py). Token counts are exact.")
print("=" * 78)
def main() -> int:
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument("--jobs", nargs="+", help="Specific job IDs to measure")
parser.add_argument("--limit", type=int, default=3,
help="Auto-pick N recent complete jobs (ignored if --jobs given)")
parser.add_argument("--models", nargs="+", default=DEFAULT_MODELS,
help=f"Models to measure (default: {' '.join(DEFAULT_MODELS)})")
args = parser.parse_args()
if any(m.startswith("claude") for m in args.models) and not os.environ.get("ANTHROPIC_API_KEY"):
logger.error("ANTHROPIC_API_KEY is not set — required for claude-* models")
return 2
from backend.services.auto_correct.service import AutoCorrectService
db = firestore.Client(project=PROJECT)
gcs = storage.Client(project=PROJECT)
service = AutoCorrectService()
if args.jobs:
jobs = [j for j in (fetch_job(db, jid) for jid in args.jobs) if j]
else:
jobs = fetch_recent_jobs(db, args.limit)
logger.info("auto-picked %d recent complete jobs with corrections", len(jobs))
if not jobs:
logger.error("no jobs to measure")
return 1
results = []
for job in jobs:
r = measure_job(service, job, gcs, args.models)
if r:
results.append(r)
if not results:
logger.error("no jobs produced measurable results")
return 1
print_report(results, args.models)
return 0
if __name__ == "__main__":
sys.exit(main())
+17 -13
View File
@@ -432,8 +432,8 @@ def create_theme_config() -> dict:
"video_duration": 5,
"existing_image": None,
"background_color": SINGA_BLACK,
"background_image": f"gs://{GCS_BUCKET}/themes/{THEME_ID}/assets/intro_background.png",
"font": f"gs://{GCS_BUCKET}/themes/{THEME_ID}/assets/Inter-SemiBold.ttf",
"background_image": "intro_background.png",
"font": "Inter-SemiBold.ttf",
"title_region": "370,450,3100,480",
"title_text_transform": None,
"title_color": SINGA_WHITE,
@@ -451,13 +451,14 @@ def create_theme_config() -> dict:
"extra_text": None,
"extra_text_color": SINGA_WHITE,
"extra_text_region": None,
"extra_text_text_transform": "uppercase",
"extra_text_gradient": None,
},
"karaoke": {
"background_color": SINGA_BLACK,
"background_image": f"gs://{GCS_BUCKET}/themes/{THEME_ID}/assets/karaoke_background.png",
"background_image": "karaoke_background.png",
"font": "Inter SemiBold",
"font_path": f"gs://{GCS_BUCKET}/themes/{THEME_ID}/assets/Inter-SemiBold.ttf",
"font_path": "Inter-SemiBold.ttf",
"font_size": 420,
"top_padding": 100,
"ass_name": "Singa",
@@ -485,8 +486,8 @@ def create_theme_config() -> dict:
"video_duration": 5,
"existing_image": None,
"background_color": SINGA_BLACK,
"background_image": f"gs://{GCS_BUCKET}/themes/{THEME_ID}/assets/end_background.png",
"font": f"gs://{GCS_BUCKET}/themes/{THEME_ID}/assets/Inter-SemiBold.ttf",
"background_image": "end_background.png",
"font": "Inter-SemiBold.ttf",
"title_region": None,
"title_text_transform": "none",
"title_color": SINGA_WHITE,
@@ -498,6 +499,7 @@ def create_theme_config() -> dict:
"extra_text": None,
"extra_text_color": None,
"extra_text_region": None,
"extra_text_text_transform": "uppercase",
"extra_text_gradient": None,
},
"cdg": {
@@ -521,20 +523,20 @@ def create_theme_config() -> dict:
"inactive_fill": SINGA_WHITE,
"inactive_stroke": SINGA_BLACK,
"instrumental_font_color": SINGA_GREEN,
"font_path": f"gs://{GCS_BUCKET}/themes/{THEME_ID}/assets/Inter-SemiBold.ttf",
"font_path": "Inter-SemiBold.ttf",
"font_size": 18,
"stroke_width": 0,
"stroke_style": "octagon",
"instrumental_gap_threshold": 1500,
"instrumental_text": "INSTRUMENTAL",
"instrumental_background": f"gs://{GCS_BUCKET}/themes/{THEME_ID}/assets/cdg_instrumental_background.gif",
"instrumental_background": "cdg_instrumental_background.gif",
"instrumental_transition": "topleftmusicalnotes",
"title_screen_background": f"gs://{GCS_BUCKET}/themes/{THEME_ID}/assets/cdg_title_background.gif",
"title_screen_background": "cdg_title_background.gif",
"title_screen_transition": "centertexttoplogobottomtext",
"title_artist_gap": 30,
"intro_duration_seconds": 10.0,
"first_syllable_buffer_seconds": 3.0,
"outro_background": f"gs://{GCS_BUCKET}/themes/{THEME_ID}/assets/cdg_title_background.gif",
"outro_background": "cdg_title_background.gif",
"outro_transition": "centertexttoplogobottomtext",
"outro_text_line1": "$title",
"outro_text_line2": "$artist",
@@ -565,9 +567,9 @@ def create_tenant_config() -> dict:
"audio_search": False,
"file_upload": True,
"youtube_url": False,
"youtube_upload": False,
"dropbox_upload": False,
"gdrive_upload": False,
"youtube_upload": False, # B2B: never publish to YouTube
"dropbox_upload": True, # Outputs delivered to the tenant's Dropbox folder
"gdrive_upload": False, # B2B: never publish to Google Drive
"theme_selection": False,
"color_overrides": False,
"enable_cdg": True,
@@ -579,6 +581,8 @@ def create_tenant_config() -> dict:
"locked_theme": THEME_ID,
"distribution_mode": "download_only",
"brand_prefix": "SINGA",
"dropbox_path": "/MediaUnsynced/Karaoke/Tracks-Singa",
"gdrive_folder_id": None, # No Google Drive for white-label tenants
"youtube_description_template": None,
},
"auth": {
+17 -13
View File
@@ -107,8 +107,8 @@ def create_theme_config() -> dict:
"video_duration": 5,
"existing_image": None,
"background_color": "#000000",
"background_image": f"gs://{GCS_BUCKET}/themes/{THEME_ID}/assets/intro_background.png",
"font": f"gs://{GCS_BUCKET}/themes/{THEME_ID}/assets/Oswald-SemiBold.ttf",
"background_image": "intro_background.png",
"font": "Oswald-SemiBold.ttf",
"title_region": "370,450,3100,480",
"title_text_transform": None,
"title_color": "#ffff00",
@@ -132,13 +132,14 @@ def create_theme_config() -> dict:
"extra_text": None,
"extra_text_color": "#ffffff",
"extra_text_region": None,
"extra_text_text_transform": "uppercase",
"extra_text_gradient": None
},
"karaoke": {
"background_color": "#000000",
"background_image": f"gs://{GCS_BUCKET}/themes/{THEME_ID}/assets/karaoke_background.jpg",
"background_image": "karaoke_background.jpg",
"font": "Oswald SemiBold",
"font_path": f"gs://{GCS_BUCKET}/themes/{THEME_ID}/assets/Oswald-SemiBold.ttf",
"font_path": "Oswald-SemiBold.ttf",
"font_size": 420,
"top_padding": 100,
"ass_name": "VocalStar",
@@ -166,8 +167,8 @@ def create_theme_config() -> dict:
"video_duration": 5,
"existing_image": None,
"background_color": "#000000",
"background_image": f"gs://{GCS_BUCKET}/themes/{THEME_ID}/assets/end_background.png",
"font": f"gs://{GCS_BUCKET}/themes/{THEME_ID}/assets/Oswald-SemiBold.ttf",
"background_image": "end_background.png",
"font": "Oswald-SemiBold.ttf",
"title_region": None,
"title_text_transform": "none",
"title_color": "#ffff00",
@@ -179,6 +180,7 @@ def create_theme_config() -> dict:
"extra_text": None,
"extra_text_color": None,
"extra_text_region": None,
"extra_text_text_transform": "uppercase",
"extra_text_gradient": None
},
"cdg": {
@@ -202,20 +204,20 @@ def create_theme_config() -> dict:
"inactive_fill": "#ffff00",
"inactive_stroke": "#000000",
"instrumental_font_color": "#ffff00",
"font_path": f"gs://{GCS_BUCKET}/themes/{THEME_ID}/assets/Oswald-SemiBold.ttf",
"font_path": "Oswald-SemiBold.ttf",
"font_size": 18,
"stroke_width": 0,
"stroke_style": "octagon",
"instrumental_gap_threshold": 1500,
"instrumental_text": "INSTRUMENTAL",
"instrumental_background": f"gs://{GCS_BUCKET}/themes/{THEME_ID}/assets/cdg_instrumental_background.gif",
"instrumental_background": "cdg_instrumental_background.gif",
"instrumental_transition": "topleftmusicalnotes",
"title_screen_background": f"gs://{GCS_BUCKET}/themes/{THEME_ID}/assets/cdg_title_background.gif",
"title_screen_background": "cdg_title_background.gif",
"title_screen_transition": "centertexttoplogobottomtext",
"title_artist_gap": 30,
"intro_duration_seconds": 10.0,
"first_syllable_buffer_seconds": 3.0,
"outro_background": f"gs://{GCS_BUCKET}/themes/{THEME_ID}/assets/cdg_title_background.gif",
"outro_background": "cdg_title_background.gif",
"outro_transition": "centertexttoplogobottomtext",
"outro_text_line1": "$title",
"outro_text_line2": "$artist",
@@ -246,9 +248,9 @@ def create_tenant_config() -> dict:
"audio_search": False, # Vocal Star provides their own audio
"file_upload": True,
"youtube_url": False,
"youtube_upload": False, # Download only
"dropbox_upload": False,
"gdrive_upload": False,
"youtube_upload": False, # B2B: never publish to YouTube
"dropbox_upload": True, # Outputs delivered to the tenant's Dropbox folder
"gdrive_upload": False, # B2B: never publish to Google Drive
"theme_selection": False, # Always use Vocal Star theme
"color_overrides": False,
"enable_cdg": True,
@@ -260,6 +262,8 @@ def create_tenant_config() -> dict:
"locked_theme": THEME_ID, # Lock to Vocal Star theme - users cannot change
"distribution_mode": "download_only",
"brand_prefix": "VSTAR",
"dropbox_path": "/MediaUnsynced/Karaoke/Tracks-VocalStar",
"gdrive_folder_id": None, # No Google Drive for white-label tenants
"youtube_description_template": None
},
"auth": {