mirror of
https://github.com/nomadkaraoke/karaoke-gen.git
synced 2026-12-01 09:37:12 +09:00
Compare commits
25
Commits
No files matched your search
+47
-21
@@ -1399,29 +1399,47 @@ jobs:
|
||||
run: |
|
||||
OLD_PRIMARY="${{ steps.config.outputs.primary_vm }}"
|
||||
OLD_PRIMARY_IP="${{ steps.config.outputs.primary_ip }}"
|
||||
API_KEY=$(gcloud secrets versions access latest \
|
||||
--secret=encoding-worker-api-key --project=nomadkaraoke)
|
||||
|
||||
ACTIVE_JOBS=$(curl -sf --connect-timeout 3 --max-time 5 "http://${OLD_PRIMARY_IP}:8080/health" \
|
||||
| jq -r '.active_jobs // 0' 2>/dev/null || echo "0")
|
||||
# Probe the worker's active_jobs. Echoes a non-negative integer on a
|
||||
# successful /health response, or "unknown" if /health can't be
|
||||
# reached or parsed. We must NOT conflate "unknown" with "0": a busy
|
||||
# encoder running a 4K render pins all 32 cores and can miss the 5s
|
||||
# health window, and treating that as idle previously let us stop the
|
||||
# VM mid-render — orphaning the job and surfacing as "lost contact
|
||||
# with worker ... not found" (incident 2026-06-15).
|
||||
probe_active_jobs() {
|
||||
local body n
|
||||
body=$(curl -sf --connect-timeout 3 --max-time 5 \
|
||||
"http://${OLD_PRIMARY_IP}:8080/health" 2>/dev/null) || { echo "unknown"; return; }
|
||||
n=$(printf '%s' "$body" | jq -r '.active_jobs // empty' 2>/dev/null)
|
||||
case "$n" in
|
||||
''|*[!0-9]*) echo "unknown" ;;
|
||||
*) echo "$n" ;;
|
||||
esac
|
||||
}
|
||||
|
||||
if [ "$ACTIVE_JOBS" -gt 0 ]; then
|
||||
echo "Old primary has $ACTIVE_JOBS active jobs, waiting for drain..."
|
||||
DRAIN_TIMEOUT=600
|
||||
ELAPSED=0
|
||||
while [ $ELAPSED -lt $DRAIN_TIMEOUT ]; do
|
||||
sleep 15
|
||||
ELAPSED=$((ELAPSED + 15))
|
||||
ACTIVE_JOBS=$(curl -sf --connect-timeout 3 --max-time 5 "http://${OLD_PRIMARY_IP}:8080/health" \
|
||||
| jq -r '.active_jobs // 0' 2>/dev/null || echo "0")
|
||||
echo "Active jobs: $ACTIVE_JOBS (${ELAPSED}s elapsed)"
|
||||
if [ "$ACTIVE_JOBS" -eq 0 ]; then
|
||||
break
|
||||
fi
|
||||
done
|
||||
# Drain: wait until /health CONFIRMS 0 active jobs, or the bounded
|
||||
# timeout elapses. "unknown" is treated as "maybe busy" and keeps us
|
||||
# waiting — we only stop on a definitive 0 (or after the timeout, so
|
||||
# a wedged worker can't block the deploy forever). 20 min comfortably
|
||||
# covers a full 4K render; the old primary only drains in-flight work
|
||||
# since new renders already route to the just-swapped new primary.
|
||||
DRAIN_TIMEOUT=1200
|
||||
ELAPSED=0
|
||||
ACTIVE_JOBS=$(probe_active_jobs)
|
||||
echo "Initial active_jobs: $ACTIVE_JOBS"
|
||||
while [ "$ACTIVE_JOBS" != "0" ] && [ $ELAPSED -lt $DRAIN_TIMEOUT ]; do
|
||||
sleep 15
|
||||
ELAPSED=$((ELAPSED + 15))
|
||||
ACTIVE_JOBS=$(probe_active_jobs)
|
||||
echo "active_jobs: $ACTIVE_JOBS (${ELAPSED}s elapsed)"
|
||||
done
|
||||
|
||||
if [ "$ACTIVE_JOBS" = "0" ]; then
|
||||
echo "Drain confirmed (0 active jobs). Stopping old primary: $OLD_PRIMARY"
|
||||
else
|
||||
echo "::warning::Drain not confirmed after ${DRAIN_TIMEOUT}s (last='${ACTIVE_JOBS}'); stopping anyway to avoid a stuck deploy"
|
||||
fi
|
||||
|
||||
echo "Stopping old primary: $OLD_PRIMARY"
|
||||
gcloud compute instances stop "$OLD_PRIMARY" \
|
||||
--zone=us-central1-c --project=nomadkaraoke || true
|
||||
|
||||
@@ -1658,7 +1676,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 +1694,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 \
|
||||
|
||||
@@ -0,0 +1,104 @@
|
||||
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 00:07 UTC = ~8pm US Eastern (8:07pm EDT / 7:07pm EST). Cron is fixed
|
||||
# UTC so the local time shifts 1h across DST. Off the :00 mark to avoid the
|
||||
# top-of-hour scheduler herd.
|
||||
- cron: '7 0 * * *'
|
||||
workflow_dispatch: {}
|
||||
|
||||
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
|
||||
# Run tenants sequentially: the GCE encoder is a single shared worker, and two
|
||||
# concurrent full renders overwhelm it ("lost contact with worker"). One at a time.
|
||||
max-parallel: 1
|
||||
matrix:
|
||||
tenant: [vocalstar, singa]
|
||||
|
||||
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 }}
|
||||
@@ -103,6 +103,31 @@ class CommunityCheckResponse(BaseModel):
|
||||
best_youtube_url: Optional[str] = None
|
||||
|
||||
|
||||
class MatchJudgeRequest(BaseModel):
|
||||
"""Request body for the artist/title match judge."""
|
||||
artist: str = Field(..., min_length=1)
|
||||
title: str = Field(..., min_length=1)
|
||||
# The audio search's confidence tier (1=strong..3=weak), so the judge can
|
||||
# tell whether weak results hint at a typo. Optional.
|
||||
audio_confidence_tier: Optional[int] = Field(None, ge=1, le=3)
|
||||
|
||||
|
||||
class MatchJudgeAlternative(BaseModel):
|
||||
artist: str
|
||||
title: str
|
||||
|
||||
|
||||
class MatchJudgeResponse(BaseModel):
|
||||
"""Verdict on a typed artist/title — formatting + match acceptance."""
|
||||
kind: str # "cosmetic" | "content" | "ambiguous" | "none"
|
||||
confident: bool
|
||||
canonical_artist: str
|
||||
canonical_title: str
|
||||
alternatives: list[MatchJudgeAlternative] = []
|
||||
engine: str # "deterministic" | "catalog" | "ai"
|
||||
reason: str = ""
|
||||
|
||||
|
||||
# --- Routes ---
|
||||
|
||||
|
||||
@@ -161,3 +186,29 @@ async def check_community_versions(
|
||||
from backend.services.karaokenerds_service import check_community_versions
|
||||
result = await check_community_versions(body.artist, body.title)
|
||||
return result
|
||||
|
||||
|
||||
@router.post("/match-judge", response_model=MatchJudgeResponse)
|
||||
async def match_judge(
|
||||
request: Request,
|
||||
body: MatchJudgeRequest,
|
||||
auth_result: AuthResult = Depends(require_auth),
|
||||
):
|
||||
"""
|
||||
Judge a typed artist/title: decide official formatting + whether it matches a
|
||||
real song. Deterministic + catalog layers run first; a light AI model fires
|
||||
only when those aren't confident. Never blocks the submission flow — failures
|
||||
degrade to a "none" verdict.
|
||||
"""
|
||||
locale = get_locale_from_request(request)
|
||||
_check_rate_limit(auth_result.user_email or auth_result.token_id or "unknown", locale)
|
||||
|
||||
from backend.services.match_judge.service import judge_match
|
||||
verdict = await judge_match(
|
||||
body.artist, body.title, audio_tier=body.audio_confidence_tier
|
||||
)
|
||||
logger.info(
|
||||
"match-judge kind=%s engine=%s confident=%s",
|
||||
verdict.kind, verdict.engine, verdict.confident,
|
||||
)
|
||||
return verdict.to_dict()
|
||||
@@ -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]
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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 ""
|
||||
|
||||
|
||||
@@ -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,
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -95,6 +95,24 @@ 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")
|
||||
|
||||
# Match judge — artist/title formatting + match-acceptance for the job
|
||||
# submission flow. Deterministic + catalog layers always run; the light AI
|
||||
# layer (Vertex Gemini Flash) fires only when those aren't confident.
|
||||
match_judge_enabled: bool = os.getenv("MATCH_JUDGE_ENABLED", "true").lower() in (
|
||||
"true", "1", "yes",
|
||||
)
|
||||
match_judge_model: str = os.getenv("MATCH_JUDGE_MODEL", "gemini-3.5-flash")
|
||||
# Bounds the AI call so a hung model never strands the submission UI.
|
||||
match_judge_timeout_ms: int = int(os.getenv("MATCH_JUDGE_TIMEOUT_MS", "3000"))
|
||||
|
||||
# Cloud Tasks (for scalable worker coordination)
|
||||
# When enabled, workers are triggered via Cloud Tasks for guaranteed delivery
|
||||
|
||||
@@ -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
|
||||
@@ -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
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
"""Artist/title match-judge: deterministic + catalog + light-AI formatting and
|
||||
match-acceptance decisions for the job-submission flow.
|
||||
|
||||
See docs/archive/2026-06-15-artist-title-matching-rework-plan.md.
|
||||
"""
|
||||
from backend.services.match_judge.verdict import MatchVerdict
|
||||
|
||||
__all__ = ["MatchVerdict"]
|
||||
@@ -0,0 +1,174 @@
|
||||
"""The light-AI layer of the match judge.
|
||||
|
||||
Invoked only when the deterministic+catalog classifier can't decide. Uses a
|
||||
small Vertex Gemini model to judge whether the typed artist/title is a real
|
||||
song, what its canonical formatting is, and whether any change is cosmetic,
|
||||
content-level, or ambiguous. The model call is injectable for testing.
|
||||
"""
|
||||
from __future__ import annotations
|
||||
|
||||
import asyncio
|
||||
import json
|
||||
import logging
|
||||
from typing import Awaitable, Callable, Optional
|
||||
|
||||
from backend.services.match_judge.verdict import (
|
||||
KIND_AMBIGUOUS,
|
||||
KIND_CONTENT,
|
||||
KIND_COSMETIC,
|
||||
KIND_NONE,
|
||||
MatchVerdict,
|
||||
)
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
_VALID_KINDS = {KIND_COSMETIC, KIND_CONTENT, KIND_AMBIGUOUS}
|
||||
|
||||
Generate = Callable[[str, str, str], Awaitable[dict]]
|
||||
|
||||
_SYSTEM_PROMPT = (
|
||||
"You normalise song metadata for a karaoke service. Given what a user typed "
|
||||
"for an artist and title (plus optional catalog candidates), decide whether it "
|
||||
"refers to a real, released song and how its artist/title should be formatted.\n"
|
||||
"Return JSON with: kind, confident, canonical_artist, canonical_title, "
|
||||
"alternatives, reason.\n"
|
||||
"kind:\n"
|
||||
" 'cosmetic' – same song, only formatting/casing/punctuation/diacritics differ.\n"
|
||||
" 'content' – the user made a typo or used a wrong/variant title; the correct "
|
||||
"song text differs in actual characters.\n"
|
||||
" 'ambiguous' – more than one plausible song matches; list them in alternatives.\n"
|
||||
" 'none' – already correct, or you cannot confidently suggest anything.\n"
|
||||
"confident: true only when you are sure. Never invent songs. Prefer the user's "
|
||||
"input when unsure (kind='none'). canonical_artist/canonical_title must use "
|
||||
"official formatting. alternatives is a list of {artist,title}."
|
||||
)
|
||||
|
||||
# OpenAPI-style schema handed to the Vertex genai client at runtime.
|
||||
RESPONSE_SCHEMA = {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"kind": {"type": "string", "enum": ["cosmetic", "content", "ambiguous", "none"]},
|
||||
"confident": {"type": "boolean"},
|
||||
"canonical_artist": {"type": "string"},
|
||||
"canonical_title": {"type": "string"},
|
||||
"alternatives": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"artist": {"type": "string"},
|
||||
"title": {"type": "string"},
|
||||
},
|
||||
},
|
||||
},
|
||||
"reason": {"type": "string"},
|
||||
},
|
||||
"required": ["kind", "confident"],
|
||||
}
|
||||
|
||||
|
||||
def _model() -> str:
|
||||
try:
|
||||
from backend.config import settings
|
||||
return getattr(settings, "match_judge_model", "gemini-3.5-flash")
|
||||
except Exception: # pragma: no cover - config import guard
|
||||
return "gemini-3.5-flash"
|
||||
|
||||
|
||||
def build_prompts(
|
||||
artist: str, title: str, candidates: list[dict], audio_tier: Optional[int]
|
||||
) -> tuple[str, str]:
|
||||
lines = [f'User typed: artist="{artist}" title="{title}"']
|
||||
if audio_tier is not None:
|
||||
lines.append(
|
||||
f"Audio-search confidence tier: {audio_tier} "
|
||||
"(1 = strong match found, 3 = weak/no results — a weak tier hints the "
|
||||
"title may be misspelled)."
|
||||
)
|
||||
if candidates:
|
||||
lines.append("Catalog candidates (canonical formatting):")
|
||||
for c in candidates:
|
||||
lines.append(f'- {c.get("artist_name", "")} — {c.get("track_name", "")}')
|
||||
else:
|
||||
lines.append("No catalog candidates were found.")
|
||||
return _SYSTEM_PROMPT, "\n".join(lines)
|
||||
|
||||
|
||||
def _verdict_from_response(
|
||||
data: object, *, fallback_artist: str, fallback_title: str
|
||||
) -> MatchVerdict:
|
||||
if not isinstance(data, dict):
|
||||
data = {}
|
||||
kind = data.get("kind")
|
||||
if kind not in _VALID_KINDS:
|
||||
return MatchVerdict(
|
||||
KIND_NONE, True, fallback_artist, fallback_title,
|
||||
engine="ai", reason="no suggestion",
|
||||
)
|
||||
canonical_artist = (data.get("canonical_artist") or "").strip() or fallback_artist
|
||||
canonical_title = (data.get("canonical_title") or "").strip() or fallback_title
|
||||
alternatives = []
|
||||
for alt in data.get("alternatives") or []:
|
||||
if isinstance(alt, dict) and alt.get("artist") and alt.get("title"):
|
||||
alternatives.append(
|
||||
{"artist": str(alt["artist"]), "title": str(alt["title"])}
|
||||
)
|
||||
return MatchVerdict(
|
||||
kind=kind,
|
||||
confident=bool(data.get("confident", False)),
|
||||
canonical_artist=canonical_artist,
|
||||
canonical_title=canonical_title,
|
||||
alternatives=alternatives,
|
||||
engine="ai",
|
||||
reason=str(data.get("reason") or ""),
|
||||
)
|
||||
|
||||
|
||||
async def ai_judge_match(
|
||||
artist: str,
|
||||
title: str,
|
||||
candidates: list[dict],
|
||||
audio_tier: Optional[int],
|
||||
*,
|
||||
model: Optional[str] = None,
|
||||
generate: Optional[Generate] = None,
|
||||
) -> MatchVerdict:
|
||||
model = model or _model()
|
||||
gen = generate or _default_generate
|
||||
system_prompt, user_prompt = build_prompts(artist, title, candidates, audio_tier)
|
||||
data = await gen(model, system_prompt, user_prompt)
|
||||
return _verdict_from_response(
|
||||
data, fallback_artist=artist, fallback_title=title
|
||||
)
|
||||
|
||||
|
||||
async def _default_generate(model: str, system_prompt: str, user_prompt: str) -> dict:
|
||||
return await asyncio.to_thread(_blocking_generate, model, system_prompt, user_prompt)
|
||||
|
||||
|
||||
def _blocking_generate(model: str, system_prompt: str, user_prompt: str) -> dict:
|
||||
import copy
|
||||
|
||||
from google import genai
|
||||
from google.genai import types
|
||||
|
||||
from backend.config import settings
|
||||
|
||||
timeout_ms = int(getattr(settings, "match_judge_timeout_ms", 3000))
|
||||
client = genai.Client(
|
||||
vertexai=True,
|
||||
project=settings.google_cloud_project,
|
||||
location="global",
|
||||
http_options=types.HttpOptions(timeout=timeout_ms),
|
||||
)
|
||||
response = client.models.generate_content(
|
||||
model=model,
|
||||
contents=[user_prompt],
|
||||
config=types.GenerateContentConfig(
|
||||
system_instruction=system_prompt,
|
||||
response_mime_type="application/json",
|
||||
response_schema=copy.deepcopy(RESPONSE_SCHEMA),
|
||||
temperature=0,
|
||||
),
|
||||
)
|
||||
return json.loads(response.text)
|
||||
@@ -0,0 +1,82 @@
|
||||
"""Deterministic + catalog match classification (no AI, no network).
|
||||
|
||||
`classify_catalog_match` returns a confident :class:`MatchVerdict` when the
|
||||
typed artist/title clearly correspond to a catalog candidate (a cosmetic
|
||||
formatting fix, or nothing to change). When it cannot confidently decide, it
|
||||
returns ``None`` — the caller should then escalate to the AI judge.
|
||||
"""
|
||||
from __future__ import annotations
|
||||
|
||||
import re
|
||||
import unicodedata
|
||||
from typing import Optional
|
||||
|
||||
from karaoke_gen.utils import normalize_text
|
||||
|
||||
from backend.services.match_judge.verdict import (
|
||||
KIND_COSMETIC,
|
||||
KIND_NONE,
|
||||
MatchVerdict,
|
||||
)
|
||||
|
||||
_NON_ALNUM = re.compile(r"[^0-9a-z\s]")
|
||||
_WS = re.compile(r"\s+")
|
||||
|
||||
|
||||
def _fold_accents(text: str) -> str:
|
||||
"""Drop combining marks so 'Beyoncé' and 'beyonce' compare equal."""
|
||||
decomposed = unicodedata.normalize("NFKD", text)
|
||||
return "".join(c for c in decomposed if not unicodedata.combining(c))
|
||||
|
||||
|
||||
def normalize_for_match(text: str) -> str:
|
||||
"""Aggressive key used only for equality comparison (never displayed).
|
||||
|
||||
Folds casing, accents, punctuation, whitespace, and treats '&' as 'and'.
|
||||
"""
|
||||
s = normalize_text(text or "")
|
||||
s = s.replace("&", " and ")
|
||||
s = _fold_accents(s)
|
||||
s = s.casefold()
|
||||
s = _NON_ALNUM.sub(" ", s)
|
||||
s = _WS.sub(" ", s).strip()
|
||||
return s
|
||||
|
||||
|
||||
def classify_catalog_match(
|
||||
artist: str, title: str, candidates: list[dict]
|
||||
) -> Optional[MatchVerdict]:
|
||||
"""Return a confident verdict from catalog candidates, or None to escalate.
|
||||
|
||||
candidates: dicts with ``artist_name`` and ``track_name`` (Spotify/MB canonical).
|
||||
"""
|
||||
key_artist = normalize_for_match(artist)
|
||||
key_title = normalize_for_match(title)
|
||||
|
||||
for cand in candidates:
|
||||
cand_artist = cand.get("artist_name") or ""
|
||||
cand_title = cand.get("track_name") or ""
|
||||
if (
|
||||
normalize_for_match(cand_artist) == key_artist
|
||||
and normalize_for_match(cand_title) == key_title
|
||||
):
|
||||
# Same song. Cosmetic fix unless the user already typed it exactly.
|
||||
if cand_artist == artist and cand_title == title:
|
||||
return MatchVerdict(
|
||||
kind=KIND_NONE,
|
||||
confident=True,
|
||||
canonical_artist=artist,
|
||||
canonical_title=title,
|
||||
engine="catalog",
|
||||
reason="already canonical",
|
||||
)
|
||||
return MatchVerdict(
|
||||
kind=KIND_COSMETIC,
|
||||
confident=True,
|
||||
canonical_artist=cand_artist,
|
||||
canonical_title=cand_title,
|
||||
engine="catalog",
|
||||
reason="formatting differs from catalog",
|
||||
)
|
||||
|
||||
return None
|
||||
@@ -0,0 +1,86 @@
|
||||
"""Match-judge orchestration.
|
||||
|
||||
Composes the deterministic+catalog classifier with the AI judge. The AI judge
|
||||
runs ONLY when the classifier can't confidently decide, and never blocks or
|
||||
errors the caller — any failure degrades to "no suggestion".
|
||||
"""
|
||||
from __future__ import annotations
|
||||
|
||||
import logging
|
||||
from typing import Awaitable, Callable, Optional
|
||||
|
||||
from backend.services.match_judge.classifier import classify_catalog_match
|
||||
from backend.services.match_judge.verdict import KIND_NONE, MatchVerdict
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
CATALOG_CANDIDATE_LIMIT = 8
|
||||
|
||||
SearchTracks = Callable[[str, Optional[str], int], Awaitable[list[dict]]]
|
||||
AiJudge = Callable[[str, str, list[dict], Optional[int]], Awaitable[MatchVerdict]]
|
||||
|
||||
|
||||
async def _default_search_tracks(query: str, artist: Optional[str], limit: int) -> list[dict]:
|
||||
from backend.services.catalog_proxy_service import search_tracks
|
||||
return await search_tracks(query, artist, limit)
|
||||
|
||||
|
||||
async def _default_ai_judge(
|
||||
artist: str, title: str, candidates: list[dict], audio_tier: Optional[int]
|
||||
) -> MatchVerdict:
|
||||
from backend.services.match_judge.ai import ai_judge_match
|
||||
return await ai_judge_match(artist, title, candidates, audio_tier)
|
||||
|
||||
|
||||
def _default_enabled() -> bool:
|
||||
try:
|
||||
from backend.config import settings
|
||||
return bool(getattr(settings, "match_judge_enabled", True))
|
||||
except Exception: # pragma: no cover - config import guard
|
||||
return True
|
||||
|
||||
|
||||
async def judge_match(
|
||||
artist: str,
|
||||
title: str,
|
||||
audio_tier: Optional[int] = None,
|
||||
*,
|
||||
search_tracks: Optional[SearchTracks] = None,
|
||||
ai_judge: Optional[AiJudge] = None,
|
||||
enabled: Optional[bool] = None,
|
||||
) -> MatchVerdict:
|
||||
"""Return a :class:`MatchVerdict` for the typed artist/title.
|
||||
|
||||
audio_tier: the audio search's confidence tier (1=best..3=poor), used by the
|
||||
AI judge to decide whether weak results suggest a typo. May be None.
|
||||
"""
|
||||
search = search_tracks or _default_search_tracks
|
||||
ai = ai_judge or _default_ai_judge
|
||||
if enabled is None:
|
||||
enabled = _default_enabled()
|
||||
|
||||
try:
|
||||
candidates = await search(title, artist, CATALOG_CANDIDATE_LIMIT)
|
||||
except Exception:
|
||||
logger.warning(
|
||||
"match-judge catalog search failed; continuing without candidates",
|
||||
exc_info=True,
|
||||
)
|
||||
candidates = []
|
||||
|
||||
verdict = classify_catalog_match(artist, title, candidates)
|
||||
if verdict is not None:
|
||||
return verdict
|
||||
|
||||
if not enabled:
|
||||
return MatchVerdict(
|
||||
KIND_NONE, True, artist, title, engine="deterministic", reason="ai disabled"
|
||||
)
|
||||
|
||||
try:
|
||||
return await ai(artist, title, candidates, audio_tier)
|
||||
except Exception:
|
||||
logger.exception("match-judge AI call failed; returning no-suggestion")
|
||||
return MatchVerdict(
|
||||
KIND_NONE, True, artist, title, engine="ai", reason="ai failed"
|
||||
)
|
||||
@@ -0,0 +1,42 @@
|
||||
"""The verdict returned by the match judge."""
|
||||
from __future__ import annotations
|
||||
|
||||
from dataclasses import dataclass, field
|
||||
from typing import Literal
|
||||
|
||||
|
||||
# kind values:
|
||||
# "cosmetic" – same song, formatting-only fix → apply invisibly
|
||||
# "content" – actual characters change (typo/different title) → surface + maybe re-search
|
||||
# "ambiguous" – more than one plausible song → ask the user first
|
||||
# "none" – nothing to change (already correct, or no confident suggestion)
|
||||
KIND_COSMETIC = "cosmetic"
|
||||
KIND_CONTENT = "content"
|
||||
KIND_AMBIGUOUS = "ambiguous"
|
||||
KIND_NONE = "none"
|
||||
|
||||
|
||||
Kind = Literal["cosmetic", "content", "ambiguous", "none"]
|
||||
Engine = Literal["deterministic", "catalog", "ai"]
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class MatchVerdict:
|
||||
kind: Kind
|
||||
confident: bool
|
||||
canonical_artist: str
|
||||
canonical_title: str
|
||||
alternatives: list[dict] = field(default_factory=list) # [{"artist","title"}]
|
||||
engine: Engine = "deterministic"
|
||||
reason: str = ""
|
||||
|
||||
def to_dict(self) -> dict:
|
||||
return {
|
||||
"kind": self.kind,
|
||||
"confident": self.confident,
|
||||
"canonical_artist": self.canonical_artist,
|
||||
"canonical_title": self.canonical_title,
|
||||
"alternatives": self.alternatives,
|
||||
"engine": self.engine,
|
||||
"reason": self.reason,
|
||||
}
|
||||
@@ -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.
|
||||
|
||||
|
||||
@@ -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"]
|
||||
|
||||
Whitespace-only changes.
@@ -0,0 +1,103 @@
|
||||
"""Tests for the AI judge: prompt construction + response→verdict mapping.
|
||||
|
||||
The model call (`generate`) is injected, so these tests are offline and
|
||||
deterministic. The real `generate` wraps the Vertex genai client.
|
||||
"""
|
||||
import pytest
|
||||
|
||||
from backend.services.match_judge.ai import ai_judge_match, build_prompts
|
||||
from backend.services.match_judge.verdict import (
|
||||
KIND_AMBIGUOUS,
|
||||
KIND_CONTENT,
|
||||
KIND_NONE,
|
||||
)
|
||||
|
||||
|
||||
def _gen(response: dict):
|
||||
async def generate(model, system_prompt, user_prompt):
|
||||
return response
|
||||
return generate
|
||||
|
||||
|
||||
class TestBuildPrompts:
|
||||
def test_prompt_includes_input_candidates_and_tier(self):
|
||||
system, user = build_prompts(
|
||||
"queen",
|
||||
"bohemian rapsody",
|
||||
[{"artist_name": "Queen", "track_name": "Bohemian Rhapsody"}],
|
||||
audio_tier=3,
|
||||
)
|
||||
assert "bohemian rapsody" in user
|
||||
assert "Bohemian Rhapsody" in user # candidate shown
|
||||
# The poor-results signal must reach the model so it can favour a typo fix.
|
||||
assert "3" in user
|
||||
|
||||
|
||||
class TestResponseMapping:
|
||||
@pytest.mark.asyncio
|
||||
async def test_confident_content_correction(self):
|
||||
verdict = await ai_judge_match(
|
||||
"queen",
|
||||
"bohemian rapsody",
|
||||
[],
|
||||
3,
|
||||
generate=_gen(
|
||||
{
|
||||
"kind": "content",
|
||||
"confident": True,
|
||||
"canonical_artist": "Queen",
|
||||
"canonical_title": "Bohemian Rhapsody",
|
||||
"alternatives": [],
|
||||
"reason": "typo",
|
||||
}
|
||||
),
|
||||
)
|
||||
assert verdict.kind == KIND_CONTENT
|
||||
assert verdict.confident is True
|
||||
assert verdict.canonical_title == "Bohemian Rhapsody"
|
||||
assert verdict.engine == "ai"
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_ambiguous_carries_alternatives(self):
|
||||
verdict = await ai_judge_match(
|
||||
"",
|
||||
"bruises",
|
||||
[],
|
||||
3,
|
||||
generate=_gen(
|
||||
{
|
||||
"kind": "ambiguous",
|
||||
"confident": False,
|
||||
"canonical_artist": "Lewis Capaldi",
|
||||
"canonical_title": "Bruises",
|
||||
"alternatives": [{"artist": "Fox Stevenson", "title": "Bruises"}],
|
||||
"reason": "multiple artists",
|
||||
}
|
||||
),
|
||||
)
|
||||
assert verdict.kind == KIND_AMBIGUOUS
|
||||
assert verdict.alternatives == [{"artist": "Fox Stevenson", "title": "Bruises"}]
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_unknown_kind_is_treated_as_none(self):
|
||||
verdict = await ai_judge_match(
|
||||
"queen",
|
||||
"bohemian rhapsody",
|
||||
[],
|
||||
1,
|
||||
generate=_gen({"kind": "garbage", "confident": True}),
|
||||
)
|
||||
assert verdict.kind == KIND_NONE
|
||||
assert verdict.canonical_artist == "queen" # falls back to user input
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_missing_canonical_falls_back_to_input(self):
|
||||
verdict = await ai_judge_match(
|
||||
"queen",
|
||||
"bohemian rhapsody",
|
||||
[],
|
||||
1,
|
||||
generate=_gen({"kind": "content", "confident": True}),
|
||||
)
|
||||
assert verdict.canonical_artist == "queen"
|
||||
assert verdict.canonical_title == "bohemian rhapsody"
|
||||
@@ -0,0 +1,66 @@
|
||||
"""Tests for the deterministic + catalog match classifier.
|
||||
|
||||
The classifier decides, WITHOUT any AI/network call, whether a typed
|
||||
artist/title cosmetically matches a catalog candidate (so we can silently
|
||||
tidy formatting) or whether the decision must be escalated to the AI judge.
|
||||
"""
|
||||
from backend.services.match_judge.classifier import (
|
||||
normalize_for_match,
|
||||
classify_catalog_match,
|
||||
)
|
||||
|
||||
|
||||
def _cand(artist: str, title: str) -> dict:
|
||||
return {"artist_name": artist, "track_name": title}
|
||||
|
||||
|
||||
class TestNormalizeForMatch:
|
||||
def test_casing_and_whitespace_collapse_to_same_key(self):
|
||||
assert normalize_for_match("Paramore") == normalize_for_match(" paramore ")
|
||||
|
||||
def test_punctuation_is_ignored(self):
|
||||
assert normalize_for_match("Big Man, Little Dignity") == normalize_for_match(
|
||||
"big man little dignity"
|
||||
)
|
||||
|
||||
def test_ampersand_and_and_are_equivalent(self):
|
||||
assert normalize_for_match("Jay-Z & Beyonce") == normalize_for_match(
|
||||
"Jay Z and Beyonce"
|
||||
)
|
||||
|
||||
|
||||
class TestClassifyCatalogMatch:
|
||||
def test_casing_only_difference_is_cosmetic(self):
|
||||
verdict = classify_catalog_match(
|
||||
"paramore",
|
||||
"big man, little dignity",
|
||||
[_cand("Paramore", "Big Man, Little Dignity")],
|
||||
)
|
||||
assert verdict is not None
|
||||
assert verdict.kind == "cosmetic"
|
||||
assert verdict.confident is True
|
||||
assert verdict.canonical_artist == "Paramore"
|
||||
assert verdict.canonical_title == "Big Man, Little Dignity"
|
||||
assert verdict.engine == "catalog"
|
||||
|
||||
def test_exact_match_needs_no_change(self):
|
||||
verdict = classify_catalog_match(
|
||||
"Paramore",
|
||||
"Big Man, Little Dignity",
|
||||
[_cand("Paramore", "Big Man, Little Dignity")],
|
||||
)
|
||||
assert verdict is not None
|
||||
assert verdict.kind == "none"
|
||||
assert verdict.confident is True
|
||||
|
||||
def test_no_catalog_match_escalates_to_ai(self):
|
||||
# Returns None => the service should call the AI judge.
|
||||
verdict = classify_catalog_match(
|
||||
"queen",
|
||||
"bohemian rhapsody",
|
||||
[_cand("Paramore", "Big Man, Little Dignity")],
|
||||
)
|
||||
assert verdict is None
|
||||
|
||||
def test_empty_candidates_escalates_to_ai(self):
|
||||
assert classify_catalog_match("queen", "bohemian rhapsody", []) is None
|
||||
@@ -0,0 +1,124 @@
|
||||
"""Orchestration tests for the match-judge service.
|
||||
|
||||
The service composes the deterministic+catalog classifier with the AI judge:
|
||||
the AI judge is invoked ONLY when the classifier can't confidently decide.
|
||||
Catalog search and the AI judge are injected so these tests touch no network.
|
||||
"""
|
||||
import pytest
|
||||
|
||||
from backend.services.match_judge.service import judge_match
|
||||
from backend.services.match_judge.verdict import (
|
||||
KIND_COSMETIC,
|
||||
KIND_CONTENT,
|
||||
KIND_NONE,
|
||||
MatchVerdict,
|
||||
)
|
||||
|
||||
|
||||
def _candidates(*pairs):
|
||||
async def _search(query, artist, limit):
|
||||
return [{"artist_name": a, "track_name": t} for a, t in pairs]
|
||||
return _search
|
||||
|
||||
|
||||
def _ai_never(*_a, **_k):
|
||||
raise AssertionError("AI judge must not be called")
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_catalog_cosmetic_match_skips_ai():
|
||||
calls = {"ai": 0}
|
||||
|
||||
async def ai(*_a, **_k):
|
||||
calls["ai"] += 1
|
||||
raise AssertionError("should not run")
|
||||
|
||||
verdict = await judge_match(
|
||||
"paramore",
|
||||
"big man, little dignity",
|
||||
search_tracks=_candidates(("Paramore", "Big Man, Little Dignity")),
|
||||
ai_judge=ai,
|
||||
enabled=True,
|
||||
)
|
||||
assert verdict.kind == KIND_COSMETIC
|
||||
assert verdict.engine == "catalog"
|
||||
assert calls["ai"] == 0
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_no_catalog_match_calls_ai():
|
||||
seen = {}
|
||||
|
||||
async def ai(artist, title, candidates, audio_tier):
|
||||
seen["candidates"] = candidates
|
||||
seen["tier"] = audio_tier
|
||||
return MatchVerdict(
|
||||
kind=KIND_CONTENT,
|
||||
confident=True,
|
||||
canonical_artist="Queen",
|
||||
canonical_title="Bohemian Rhapsody",
|
||||
engine="ai",
|
||||
reason="typo fix",
|
||||
)
|
||||
|
||||
verdict = await judge_match(
|
||||
"queen",
|
||||
"bohemian rapsody",
|
||||
audio_tier=3,
|
||||
search_tracks=_candidates(("Queen", "Radio Ga Ga")),
|
||||
ai_judge=ai,
|
||||
enabled=True,
|
||||
)
|
||||
assert verdict.kind == KIND_CONTENT
|
||||
assert verdict.engine == "ai"
|
||||
assert seen["tier"] == 3
|
||||
assert seen["candidates"] == [{"artist_name": "Queen", "track_name": "Radio Ga Ga"}]
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_disabled_flag_skips_ai_and_returns_none():
|
||||
verdict = await judge_match(
|
||||
"queen",
|
||||
"bohemian rapsody",
|
||||
search_tracks=_candidates(("Queen", "Radio Ga Ga")),
|
||||
ai_judge=_ai_never,
|
||||
enabled=False,
|
||||
)
|
||||
assert verdict.kind == KIND_NONE
|
||||
assert verdict.confident is True
|
||||
assert verdict.canonical_artist == "queen" # leaves user input untouched
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_ai_failure_falls_back_to_none():
|
||||
async def ai(*_a, **_k):
|
||||
raise RuntimeError("model exploded")
|
||||
|
||||
verdict = await judge_match(
|
||||
"queen",
|
||||
"bohemian rapsody",
|
||||
search_tracks=_candidates(("Queen", "Radio Ga Ga")),
|
||||
ai_judge=ai,
|
||||
enabled=True,
|
||||
)
|
||||
assert verdict.kind == KIND_NONE
|
||||
assert verdict.canonical_title == "bohemian rapsody"
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_catalog_search_failure_still_lets_ai_run():
|
||||
async def failing_search(query, artist, limit):
|
||||
raise RuntimeError("catalog down")
|
||||
|
||||
async def ai(artist, title, candidates, audio_tier):
|
||||
assert candidates == [] # gracefully degraded to no candidates
|
||||
return MatchVerdict(KIND_NONE, True, artist, title, engine="ai")
|
||||
|
||||
verdict = await judge_match(
|
||||
"queen",
|
||||
"bohemian rhapsody",
|
||||
search_tracks=failing_search,
|
||||
ai_judge=ai,
|
||||
enabled=True,
|
||||
)
|
||||
assert verdict.engine == "ai"
|
||||
@@ -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,77 @@
|
||||
"""Tests for POST /api/catalog/match-judge."""
|
||||
import pytest
|
||||
from unittest.mock import AsyncMock, patch, MagicMock
|
||||
from fastapi.testclient import TestClient
|
||||
|
||||
from backend.main import app
|
||||
from backend.services.match_judge.verdict import MatchVerdict, KIND_COSMETIC
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def client():
|
||||
return TestClient(app)
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def auth_headers():
|
||||
return {"Authorization": "Bearer test-admin-token"}
|
||||
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
def clear_rate_limits():
|
||||
from backend.api.routes.catalog import _rate_limit_windows
|
||||
_rate_limit_windows.clear()
|
||||
yield
|
||||
_rate_limit_windows.clear()
|
||||
|
||||
|
||||
@patch("backend.api.routes.catalog.require_auth")
|
||||
@patch("backend.services.match_judge.service.judge_match", new_callable=AsyncMock)
|
||||
def test_match_judge_returns_verdict(mock_judge, mock_auth, client, auth_headers):
|
||||
mock_auth.return_value = MagicMock(user_email="t@example.com", token_id="t")
|
||||
mock_judge.return_value = MatchVerdict(
|
||||
kind=KIND_COSMETIC,
|
||||
confident=True,
|
||||
canonical_artist="Paramore",
|
||||
canonical_title="Big Man, Little Dignity",
|
||||
engine="catalog",
|
||||
reason="casing",
|
||||
)
|
||||
|
||||
resp = client.post(
|
||||
"/api/catalog/match-judge",
|
||||
json={"artist": "paramore", "title": "big man, little dignity"},
|
||||
headers=auth_headers,
|
||||
)
|
||||
assert resp.status_code == 200
|
||||
data = resp.json()
|
||||
assert data["kind"] == "cosmetic"
|
||||
assert data["confident"] is True
|
||||
assert data["canonical_artist"] == "Paramore"
|
||||
assert data["canonical_title"] == "Big Man, Little Dignity"
|
||||
assert data["engine"] == "catalog"
|
||||
|
||||
|
||||
@patch("backend.api.routes.catalog.require_auth")
|
||||
@patch("backend.services.match_judge.service.judge_match", new_callable=AsyncMock)
|
||||
def test_match_judge_passes_audio_tier(mock_judge, mock_auth, client, auth_headers):
|
||||
mock_auth.return_value = MagicMock(user_email="t@example.com", token_id="t")
|
||||
mock_judge.return_value = MatchVerdict("none", True, "q", "b", engine="ai")
|
||||
|
||||
client.post(
|
||||
"/api/catalog/match-judge",
|
||||
json={"artist": "q", "title": "b", "audio_confidence_tier": 3},
|
||||
headers=auth_headers,
|
||||
)
|
||||
# judge_match(artist, title, audio_tier=...) — tier forwarded
|
||||
_, kwargs = mock_judge.call_args
|
||||
assert kwargs.get("audio_tier") == 3 or mock_judge.call_args.args[2] == 3
|
||||
|
||||
|
||||
def test_match_judge_validation_error(client, auth_headers):
|
||||
resp = client.post(
|
||||
"/api/catalog/match-judge",
|
||||
json={"artist": "", "title": "Dreams"},
|
||||
headers=auth_headers,
|
||||
)
|
||||
assert resp.status_code == 422
|
||||
@@ -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()
|
||||
@@ -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.
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -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):
|
||||
|
||||
@@ -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."""
|
||||
|
||||
@@ -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)}
|
||||
@@ -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))
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -452,6 +452,27 @@ class VideoWorkerOrchestrator:
|
||||
if self.config.countdown_padding_seconds:
|
||||
self.job_log.info(f"Countdown padding: {self.config.countdown_padding_seconds}s - instrumental will be padded")
|
||||
|
||||
# The GCE encoder downloads its inputs from input_gcs_path (jobs/{job_id}/) and resolves
|
||||
# the instrumental via find_file. For jobs that supply their own instrumental
|
||||
# (existing_instrumental flow, e.g. tenant submissions), the file lives under
|
||||
# uploads/{job_id}/audio/existing_instrumental.* — which is NOT under jobs/{job_id}/ and
|
||||
# is NOT a name the encoder's 'custom' branch looks for. The encoder's 'custom' branch
|
||||
# globs for "*custom_instrumental*.{flac,mp3}" / "*Instrumental Custom*", so copy the
|
||||
# supplied instrumental into jobs/{job_id}/custom_instrumental.<ext> (server-side, from
|
||||
# the authoritative GCS source — no dependency on local temp files). Without this,
|
||||
# existing-instrumental jobs fail at the encoder with "No instrumental audio found".
|
||||
if encoding_backend.name == "gce" and self.storage:
|
||||
try:
|
||||
srcs = self.storage.list_files(f"uploads/{self.config.job_id}/audio/existing_instrumental")
|
||||
if srcs:
|
||||
src = srcs[0]
|
||||
ext = os.path.splitext(src)[1].lower() or ".mp3"
|
||||
dest = f"jobs/{self.config.job_id}/custom_instrumental{ext}"
|
||||
self.storage.copy_blob(src, dest)
|
||||
self.job_log.info(f"Staged custom instrumental for GCE encoder: {dest}")
|
||||
except Exception as e:
|
||||
self.job_log.warning(f"Failed to stage custom instrumental for GCE encoder: {e}")
|
||||
|
||||
# Run encoding
|
||||
with job_span("encoding", self.config.job_id) as span:
|
||||
add_span_event("encoding_started", {"backend": encoding_backend.name})
|
||||
|
||||
+64
-7
@@ -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
|
||||
@@ -813,6 +831,45 @@ Response:
|
||||
|
||||
When `has_community` is true, the frontend shows a dismissible green banner suggesting the user check existing versions before creating a new one.
|
||||
|
||||
#### Match Judge (artist/title formatting + match acceptance)
|
||||
|
||||
```http
|
||||
POST /api/catalog/match-judge
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
"artist": "paramore",
|
||||
"title": "big man, little dignity",
|
||||
"audio_confidence_tier": 1
|
||||
}
|
||||
```
|
||||
|
||||
Decides the official formatting for a typed artist/title and whether it matches a
|
||||
real song. A deterministic normalizer + the catalog run first; a light Vertex
|
||||
Gemini model (`MATCH_JUDGE_MODEL`, default `gemini-3.5-flash`) is consulted
|
||||
**only** when those aren't confident. `audio_confidence_tier` (1=strong..3=weak,
|
||||
optional) lets the judge tell whether weak audio results hint at a typo. The call
|
||||
never blocks job creation — on timeout/error it returns a `none` verdict. Disable
|
||||
the AI layer with `MATCH_JUDGE_ENABLED=false` (deterministic+catalog still run).
|
||||
|
||||
Response:
|
||||
```json
|
||||
{
|
||||
"kind": "cosmetic",
|
||||
"confident": true,
|
||||
"canonical_artist": "Paramore",
|
||||
"canonical_title": "Big Man, Little Dignity",
|
||||
"alternatives": [],
|
||||
"engine": "catalog",
|
||||
"reason": "formatting differs from catalog"
|
||||
}
|
||||
```
|
||||
|
||||
`kind` drives the Step 2 UI: `cosmetic` → silent tidy with an undo line;
|
||||
`content` (confident) → applied with a "Corrected … · Undo" line, re-searching
|
||||
audio only when the original results were weak; `ambiguous` (or unconfident
|
||||
`content`) → an ask-first "Did you mean?" prompt; `none` → no change.
|
||||
|
||||
### Audio Search
|
||||
|
||||
#### Search for Audio
|
||||
|
||||
@@ -72,6 +72,9 @@ When a metadata key is missing, don't set it to "now" and skip the action — th
|
||||
### Pending Jobs Guard Must Not Reset Idle Timestamps (Mar 2026)
|
||||
When pending CI jobs are detected, keep runners alive but don't refresh their `last-activity` timestamps. Refreshing timestamps resets the idle timer, so runners can never accumulate enough idle time to be stopped — even after all jobs complete.
|
||||
|
||||
### "Is It Busy?" Guards Must Fail SAFE, Not Fail Open (Jun 2026)
|
||||
Both stop paths for the GCE encoder VMs guarded against killing a busy worker by checking `/health`'s `active_jobs` — but both defaulted to **0 (= idle)** when `/health` was unreachable or slow (CI drain: `... || echo "0"`; idle Cloud Function: `except: return 0`). A busy encoder runs a 4K ffmpeg on all 32 cores and shares uvicorn with the encode subprocess, so `/health` can miss its timeout *while the VM is hard at work*. Combined with blue/green deploy churn (every merge cycles the VMs) and the 5-min idle check, this stopped VMs **mid-render**, orphaning the in-memory job so backend polls got 404 → "lost contact with worker ... not found" (incident 2026-06-15; the burst was self-inflicted by rapid PR merges during the tenant E2E, 0 in the prior 48h). **Rule:** a guard that decides whether to destroy work must treat "couldn't confirm" as "assume busy / don't act," never as the permissive default. Retry the probe, and only act on a *confirmed* safe signal (here: a real `active_jobs == 0` from a 200 response), with a bounded timeout so a wedged worker can't block forever.
|
||||
|
||||
### Cloud Run GPU: Let the Platform Scale, Not Your Code (Mar 2026)
|
||||
|
||||
**Don't use fire-and-forget + semaphore on Cloud Run.** We tried making the `/separate` endpoint return immediately (fire-and-forget background thread) with a `threading.Semaphore(1)` to serialize GPU work. Cloud Run couldn't see background threads as "busy", so it routed ALL requests to one instance where they queued behind the semaphore — causing 30-minute timeouts in production.
|
||||
|
||||
@@ -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,105 @@
|
||||
# Artist/Title Matching, Suggestions & Auto-Correction Rework (Phase 1)
|
||||
|
||||
**Date:** 2026-06-15
|
||||
**Worktree:** `karaoke-gen-submission-form-simplify`
|
||||
**Branch:** `feat/sess-20260615-0101-submission-form-simplify`
|
||||
**Status:** Design + plan — pending implementation
|
||||
|
||||
## Problem
|
||||
|
||||
On Step 2 ("Choose Audio") the wizard stacks two green "success" cards: the **"Song found in our database"** catalog panel and the **"Perfect match found"** audio card. User feedback: the first reads like "we already have this karaoke video," when its only real job is to nudge the user toward **official artist/title formatting** (a quality-bar concern for *published* tracks). It's confusing, and the underlying case-insensitive match is imperfect.
|
||||
|
||||
This phase reworks **only** the artist/title matching → suggestion → auto-correction behavior. The broader flow structure is deliberately left intact (see "Constraints from history"). The title-screen preview perf fix is tracked separately.
|
||||
|
||||
## Decisions (from 2026-06-15 brainstorm with Andrew)
|
||||
|
||||
1. **Invisible cosmetic tidy.** When formatting differs only cosmetically (casing, spacing, punctuation, diacritics, `&`/`feat.` conventions) and we're confident it's the same song, **silently apply** the official formatting. No green "database" card. Show only a faint, dismissible line: *"Tidied to **Paramore — Big Man, Little Dignity** · keep what I typed"*.
|
||||
2. **Confident content correction → auto-apply + surface + smart re-search.** When the correction changes actual characters (e.g. `Yesteray → Yesterday`) and we're confident, apply it **and** surface it with one-tap Undo: *"Corrected to **Yesterday** — you typed 'Yesteray' · Undo"*. Because characters changed, the original audio search may be poor, so **re-run the audio search** — automatically **only when the original results were weak** (tier 3 / empty); otherwise offer a quiet "Search again" link.
|
||||
3. **Ambiguous → ask first.** When the judge isn't confident which song is meant (multiple plausible candidates), show an ask-first prompt: *"Did you mean **X**? [Use this] [Keep mine]"* before changing anything.
|
||||
4. **Three-layer engine, all in v1.** Deterministic rules → catalog canonical → light AI judge. **The AI judge fires only when the deterministic + catalog layers are not confident** (cheap; happy path never invokes it).
|
||||
|
||||
## Constraints from history (do NOT regress)
|
||||
|
||||
From `docs/archive/2026-02-28-ux-*`, `2026-03-02-decouple-search-from-job-creation.md`, `2026-03-08-step2-song-suggestions.plan.md`, `2026-03-08-fuzzy-did-you-mean.plan.md`, `docs/LESSONS-LEARNED.md`, PRs #444/#451/#480/#495/#512:
|
||||
|
||||
- **No Step-1 autocomplete.** It was added (PR #451) then removed (PR #512) because users didn't understand it. Suggestions belong on Step 2, in parallel with the audio search.
|
||||
- **Cosmetic correction must NOT restart the audio search.** Already a documented decision — the existing catalog `onArtistTitleCorrection` updates artist/title without re-searching. Preserve this. (Content corrections that change characters MAY re-search — see decision 2.)
|
||||
- **Deferred job creation (search-session pattern).** No job is created until the final confirm step. Don't move creation earlier. The tidied artist/title is passed at `create-from-search` time; the audio `search_session_id` is unaffected by a metadata tidy.
|
||||
- **Preserve the fuzzy artist-tiebreaker lesson:** when title-matching returns multiple artists with the same song name, use the user's (possibly garbled) artist input as a tiebreaker. And the gating: fuzzy/"did you mean" only triggers when audio results are poor.
|
||||
- **`display_artist`/`display_title`** stay distinct from matching `artist`/`title`; they're set at creation time. The tidy applies to the **matching** artist/title (what drives search, lyrics, and published metadata).
|
||||
- **Public vs private brand rule, audio-before-customize ordering, combined review flow** — untouched by this phase.
|
||||
|
||||
## Architecture
|
||||
|
||||
Consolidate today's scattered client-side matching (case-insensitive exact match in `SongSuggestionPanel` + LCS fuzzy in `audio-search-utils.ts`) into **one backend "match judge" service**, called from Step 2 in parallel with the audio search (replacing the current `searchCatalogTracks` + client fuzzy effect). Rationale: testable, consistent canonical formatting, and the AI layer needs the backend's LLM clients/keys.
|
||||
|
||||
### Backend: `POST /api/catalog/match-judge`
|
||||
|
||||
Request: `{ artist, title, audio_confidence_tier?: 1|2|3 }`
|
||||
(The frontend passes the audio search's computed confidence tier so the judge knows whether weak results suggest a typo.)
|
||||
|
||||
Pipeline (server-side):
|
||||
1. **Deterministic normalize** (reuse/extend `karaoke_gen.utils.normalize_text`): trim, collapse whitespace, fix obvious casing (title-case with small-word handling), straighten quotes, standardize `feat.`/`ft.` → `(feat. …)` and `and`↔`&` per house style.
|
||||
2. **Catalog lookup** (existing `search_tracks` via `catalog_proxy_service`). If a candidate matches the normalized input under a strict normalized-equality test → **confident cosmetic**: return the catalog's canonical `artist_name`/`track_name`.
|
||||
3. **AI judge — only if (1)+(2) not confident.** Invoke a light model (see "Model") with the typed input, the top catalog candidates, and the audio tier. It returns a structured verdict.
|
||||
|
||||
Response:
|
||||
```json
|
||||
{
|
||||
"kind": "cosmetic | content | ambiguous | none",
|
||||
"confident": true,
|
||||
"canonical_artist": "Paramore",
|
||||
"canonical_title": "Big Man, Little Dignity",
|
||||
"alternatives": [{"artist": "...", "title": "..."}],
|
||||
"engine": "deterministic | catalog | ai",
|
||||
"reason": "casing only"
|
||||
}
|
||||
```
|
||||
- `kind=cosmetic` → frontend applies invisibly + faint line (no re-search).
|
||||
- `kind=content` + `confident` → frontend auto-applies + Undo line; re-search if audio tier was weak.
|
||||
- `kind=ambiguous` (or `content` not confident) → frontend shows ask-first "Did you mean?" with `alternatives`.
|
||||
- `kind=none` → no suggestion (leave user input as typed).
|
||||
|
||||
**Resilience:** AI judge runs under a short timeout (~2–3s) and is fully optional — on timeout/error/unparseable output, fall back to deterministic+catalog result (or `kind=none`). Never block the audio search; never error the request. Mirror `auto_correct`'s greppable usage/cost logging (`match-judge usage/cost job/session=…`).
|
||||
|
||||
### Model (decided)
|
||||
|
||||
Reuse `auto_correct` dispatch (`claude*` → Anthropic, else Gemini via `genai.Client(vertexai=True, project=…, location="global").models.generate_content(model=…)`).
|
||||
**Decision (Andrew, 2026-06-15):** default `MATCH_JUDGE_MODEL=gemini-3.5-flash` — the latest Vertex Gemini Flash (https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/gemini/3-5-flash). Passed bare to the genai Vertex client exactly like `auto_correct` passes `gemini-3.1-pro-preview`. No `ANTHROPIC_API_KEY` needed. Env-configurable, so if Vertex requires a version suffix it's a one-line env change (an invalid id surfaces as a loud error on first call). Add `gemini-3.5-flash` pricing to `pricing.py` for cost logging.
|
||||
|
||||
### Frontend (`AudioSourceStep.tsx`)
|
||||
|
||||
- Replace the parallel `searchCatalogTracks` + client fuzzy `useEffect` with a single `api.matchJudge(artist, title, tier)` call fired in parallel on mount (after the audio tier is known, or fired and reconciled when the tier resolves).
|
||||
- **Remove** the green `SongSuggestionPanel`. Add a quiet `TidyNotice` (cosmetic) and reuse/restyle `DidYouMeanBanner` for the surfaced-content (Undo) and ambiguous (ask) cases.
|
||||
- Wire cosmetic/confident-content application through the existing `onArtistTitleCorrection` (no restart). Add a `reSearch()` path (reuse `handleFuzzyAccept`'s restart logic) gated on weak prior results for content corrections.
|
||||
- Keep the `confidence.tier` gating and artist-tiebreaker semantics (now enforced server-side, but the frontend still passes the tier).
|
||||
|
||||
## Out of scope (this phase)
|
||||
|
||||
- Title-screen preview perf (separate task: smaller canvas + low-res bg + preload at step 2 + spinner).
|
||||
- Any change to step count / visibility / customize / job-creation timing.
|
||||
- Auto-selecting audio on a Tier-1 match (possible later, separately).
|
||||
|
||||
## Testing strategy
|
||||
|
||||
Per `docs/TESTING.md`:
|
||||
- **Backend unit:** deterministic normalizer rule table (casing, spacing, punctuation, feat./&, quotes); judge response parsing; confidence/kind classification; AI-failure fallback; "only call AI when not confident" gating.
|
||||
- **Backend integration:** `/api/catalog/match-judge` happy/edge paths with catalog mocked and AI mocked.
|
||||
- **Frontend unit (Jest):** TidyNotice rendering + Undo; content-correction auto-apply + smart re-search gating (weak vs ok results); ambiguous ask-first; preserve "no restart on cosmetic".
|
||||
- **E2E (Playwright) + prod E2E:** end-to-end on a real song (cosmetic case), a typo case (content + re-search), and an ambiguous case.
|
||||
|
||||
## Telemetry
|
||||
|
||||
- Log judge decisions + engine used + latency + token cost (greppable, like `auto-correct usage/cost`).
|
||||
- Count cosmetic / content / ambiguous / none and Undo clicks to measure real-world correction quality (informs whether thresholds need tuning).
|
||||
|
||||
## Open decisions
|
||||
|
||||
1. ~~Judge model default~~ — DECIDED: `gemini-3.5-flash` (Vertex), configurable via `MATCH_JUDGE_MODEL`.
|
||||
2. Confidence thresholds for cosmetic vs content vs ambiguous (start conservative; tune from telemetry).
|
||||
3. Whether to keep a tiny instant frontend normalizer for immediate display, or rely solely on the judge response (~sub-second). Lean: rely on judge for v1; add instant normalize later if the delay is noticeable.
|
||||
|
||||
## Rollout
|
||||
|
||||
- `MATCH_JUDGE_ENABLED` env flag (default on) so the AI layer can be disabled without a deploy; deterministic+catalog still function if AI is off.
|
||||
- Bump `pyproject.toml` version. Ship behind normal CI; Andrew reviews locally (localhost:3000 → prod backend) before merge/deploy.
|
||||
@@ -0,0 +1,98 @@
|
||||
# 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/`.
|
||||
|
||||
## Outcome
|
||||
|
||||
Both tenants pass the full prod E2E (PRs #824–#830): log in → submit (artist, title, mixed,
|
||||
instrumental) → transcribe → review → render with the locked theme → encode → package →
|
||||
Dropbox delivery, with **no YouTube, no Google Drive**, and all outputs (4K / 720p /
|
||||
with-vocals MP4 + CDG + TXT) downloadable from the portal via `job.file_urls`.
|
||||
|
||||
The encoder blocker (bug #8) took three iterations: the staging had to land in the
|
||||
**orchestrator** path (`video_worker_orchestrator._run_encoding`, not the legacy
|
||||
`_encode_via_gce`) and use the filename the running encoder VM's `custom` branch globs for
|
||||
(`custom_instrumental.<ext>`, since the live VM boots the 2026-01-23 image whose `custom`
|
||||
branch predates `*existing_instrumental*` / `*Instrumental User*`). The instrumental is
|
||||
server-side-copied from `uploads/{job}/audio/existing_instrumental.*` →
|
||||
`jobs/{job}/custom_instrumental.<ext>`.
|
||||
|
||||
## 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} />)
|
||||
|
||||
@@ -23,6 +23,7 @@ jest.mock("@/lib/api", () => ({
|
||||
searchStandalone: jest.fn(),
|
||||
searchCatalogTracks: jest.fn(),
|
||||
checkCommunityVersions: jest.fn(),
|
||||
matchJudge: jest.fn(),
|
||||
createJobFromSearch: jest.fn(),
|
||||
},
|
||||
ApiError: class ApiError extends Error {
|
||||
@@ -92,6 +93,15 @@ function setupMocks() {
|
||||
songs: [],
|
||||
best_youtube_url: null,
|
||||
})
|
||||
mockApi.matchJudge.mockResolvedValue({
|
||||
kind: "none",
|
||||
confident: true,
|
||||
canonical_artist: "ABBA",
|
||||
canonical_title: "Waterloo",
|
||||
alternatives: [],
|
||||
engine: "catalog",
|
||||
reason: "",
|
||||
})
|
||||
}
|
||||
|
||||
describe("AudioSourceStep", () => {
|
||||
@@ -108,11 +118,11 @@ describe("AudioSourceStep", () => {
|
||||
})
|
||||
})
|
||||
|
||||
it("calls searchCatalogTracks on mount in parallel", async () => {
|
||||
it("calls matchJudge after the search resolves, with the confidence tier", async () => {
|
||||
render(<AudioSourceStep {...defaultProps} />)
|
||||
|
||||
await waitFor(() => {
|
||||
expect(mockApi.searchCatalogTracks).toHaveBeenCalledWith("Waterloo", "ABBA", 5)
|
||||
expect(mockApi.matchJudge).toHaveBeenCalledWith("ABBA", "Waterloo", 1)
|
||||
})
|
||||
})
|
||||
|
||||
@@ -147,16 +157,46 @@ describe("AudioSourceStep", () => {
|
||||
expect(screen.getByText("ABBA - Waterloo")).toBeInTheDocument()
|
||||
})
|
||||
|
||||
it("renders SongSuggestionPanel when catalog returns results", async () => {
|
||||
mockApi.searchCatalogTracks.mockResolvedValue([
|
||||
{ artist_name: "ABBA", track_name: "Waterloo (Remastered)" },
|
||||
])
|
||||
it("auto-applies a cosmetic tidy and shows the tidy notice", async () => {
|
||||
mockApi.matchJudge.mockResolvedValue({
|
||||
kind: "cosmetic",
|
||||
confident: true,
|
||||
canonical_artist: "ABBA",
|
||||
canonical_title: "Waterloo (Remastered)",
|
||||
alternatives: [],
|
||||
engine: "catalog",
|
||||
reason: "",
|
||||
})
|
||||
|
||||
render(<AudioSourceStep {...defaultProps} />)
|
||||
|
||||
await waitFor(() => {
|
||||
expect(screen.getByTestId("song-suggestion-panel")).toBeInTheDocument()
|
||||
expect(defaultProps.onArtistTitleCorrection).toHaveBeenCalledWith("ABBA", "Waterloo (Remastered)")
|
||||
})
|
||||
expect(screen.getByTestId("match-tidy-notice")).toBeInTheDocument()
|
||||
})
|
||||
|
||||
it("does not auto-apply an ambiguous match — shows an ask instead", async () => {
|
||||
mockApi.matchJudge.mockResolvedValue({
|
||||
kind: "ambiguous",
|
||||
confident: false,
|
||||
canonical_artist: "Lewis Capaldi",
|
||||
canonical_title: "Bruises",
|
||||
alternatives: [{ artist: "Fox Stevenson", title: "Bruises" }],
|
||||
engine: "ai",
|
||||
reason: "",
|
||||
})
|
||||
|
||||
render(<AudioSourceStep {...defaultProps} />)
|
||||
|
||||
await waitFor(() => {
|
||||
expect(screen.getByTestId("match-didyoumean")).toBeInTheDocument()
|
||||
})
|
||||
expect(defaultProps.onArtistTitleCorrection).not.toHaveBeenCalled()
|
||||
|
||||
const user = userEvent.setup()
|
||||
await user.click(screen.getByText("Lewis Capaldi — Bruises"))
|
||||
expect(defaultProps.onArtistTitleCorrection).toHaveBeenCalledWith("Lewis Capaldi", "Bruises")
|
||||
})
|
||||
|
||||
it("renders CommunityVersionBanner when community data has results", async () => {
|
||||
@@ -239,8 +279,8 @@ describe("AudioSourceStep", () => {
|
||||
expect(defaultProps.onBack).toHaveBeenCalledTimes(1)
|
||||
})
|
||||
|
||||
it("silently handles catalog search failure (does not show error)", async () => {
|
||||
mockApi.searchCatalogTracks.mockRejectedValue(new Error("catalog down"))
|
||||
it("silently handles matchJudge failure (does not show error)", async () => {
|
||||
mockApi.matchJudge.mockRejectedValue(new Error("judge down"))
|
||||
|
||||
render(<AudioSourceStep {...defaultProps} />)
|
||||
|
||||
@@ -248,8 +288,8 @@ describe("AudioSourceStep", () => {
|
||||
expect(mockApi.searchStandalone).toHaveBeenCalled()
|
||||
})
|
||||
|
||||
// No error shown for catalog failure — it's a nice-to-have
|
||||
expect(screen.queryByText("catalog down")).not.toBeInTheDocument()
|
||||
// No error shown for judge failure — it's a nice-to-have
|
||||
expect(screen.queryByText("judge down")).not.toBeInTheDocument()
|
||||
})
|
||||
|
||||
it("silently handles community check failure", async () => {
|
||||
@@ -264,16 +304,15 @@ describe("AudioSourceStep", () => {
|
||||
expect(screen.queryByText("community down")).not.toBeInTheDocument()
|
||||
})
|
||||
|
||||
it("does not show SongSuggestionPanel when catalog returns empty array", async () => {
|
||||
mockApi.searchCatalogTracks.mockResolvedValue([])
|
||||
|
||||
it("shows no match notice for a 'none' verdict", async () => {
|
||||
render(<AudioSourceStep {...defaultProps} />)
|
||||
|
||||
await waitFor(() => {
|
||||
expect(mockApi.searchStandalone).toHaveBeenCalled()
|
||||
expect(mockApi.matchJudge).toHaveBeenCalled()
|
||||
})
|
||||
|
||||
expect(screen.queryByTestId("song-suggestion-panel")).not.toBeInTheDocument()
|
||||
expect(screen.queryByTestId("match-tidy-notice")).not.toBeInTheDocument()
|
||||
expect(screen.queryByTestId("match-didyoumean")).not.toBeInTheDocument()
|
||||
})
|
||||
|
||||
it("does not show CommunityVersionBanner when has_community is false", async () => {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
import { useTranslations } from "next-intl"
|
||||
import { useState, useEffect, useMemo, useCallback, useRef } from "react"
|
||||
import { api, ApiError, CatalogTrackResult, CommunityCheckResponse } from "@/lib/api"
|
||||
import { api, ApiError, CatalogTrackResult, CommunityCheckResponse, MatchJudgeVerdict } from "@/lib/api"
|
||||
import { CommunityVersionBanner } from "@/components/job/CommunityVersionBanner"
|
||||
import {
|
||||
ExtendedAudioSearchResult,
|
||||
@@ -18,7 +18,7 @@ import {
|
||||
} from "@/lib/audio-search-utils"
|
||||
import { Button } from "@/components/ui/button"
|
||||
import { Input } from "@/components/ui/input"
|
||||
import { Loader2, ChevronDown, ChevronUp, Upload, Youtube, ArrowLeft, Check, AlertTriangle, CheckCircle2, Lightbulb, Info, Search, X, Scissors, Zap } from "lucide-react"
|
||||
import { Loader2, ChevronDown, ChevronUp, Upload, Youtube, ArrowLeft, Check, AlertTriangle, CheckCircle2, Lightbulb, Info, X, Scissors, Zap } from "lucide-react"
|
||||
import { BuyCreditsDialog } from "@/components/credits/BuyCreditsDialog"
|
||||
|
||||
interface AudioSourceStepProps {
|
||||
@@ -138,19 +138,17 @@ export function AudioSourceStep({
|
||||
const [expandedCategories, setExpandedCategories] = useState<Set<string>>(new Set())
|
||||
const searchTriggered = useRef(false)
|
||||
|
||||
// Catalog song suggestions (parallel to audio search)
|
||||
const [catalogResults, setCatalogResults] = useState<CatalogTrackResult[]>([])
|
||||
const [catalogDismissed, setCatalogDismissed] = useState(false)
|
||||
|
||||
// Community version check (parallel to audio search)
|
||||
const [communityData, setCommunityData] = useState<CommunityCheckResponse | null>(null)
|
||||
const [communityDismissed, setCommunityDismissed] = useState(false)
|
||||
|
||||
// Fuzzy "Did you mean?" state
|
||||
const [fuzzySuggestion, setFuzzySuggestion] = useState<CatalogTrackResult | null>(null)
|
||||
const [fuzzyAlternatives, setFuzzyAlternatives] = useState<CatalogTrackResult[]>([])
|
||||
const [fuzzyDismissed, setFuzzyDismissed] = useState(false)
|
||||
const fuzzyTriggered = useRef(false)
|
||||
// Artist/title match judge: formatting tidy + match-acceptance + did-you-mean.
|
||||
// Runs after the audio search resolves so the judge sees the confidence tier.
|
||||
const [verdict, setVerdict] = useState<MatchJudgeVerdict | null>(null)
|
||||
const [verdictDismissed, setVerdictDismissed] = useState(false)
|
||||
// What we auto-applied, so the user can Undo back to exactly what they typed.
|
||||
const [appliedFrom, setAppliedFrom] = useState<{ artist: string; title: string } | null>(null)
|
||||
const judgeTriggered = useRef(false)
|
||||
|
||||
const [showBuyCreditsDialog, setShowBuyCreditsDialog] = useState(false)
|
||||
|
||||
@@ -204,17 +202,12 @@ export function AudioSourceStep({
|
||||
}
|
||||
}, [artist, title, onSearchCompleted])
|
||||
|
||||
// Auto-trigger audio search + catalog search in parallel on mount
|
||||
// Auto-trigger audio search + community check in parallel on mount.
|
||||
// The match judge runs in a separate effect once the search resolves (below).
|
||||
useEffect(() => {
|
||||
if (searchTriggered.current) return
|
||||
searchTriggered.current = true
|
||||
doSearch()
|
||||
// Fire catalog search in parallel (non-blocking)
|
||||
api.searchCatalogTracks(title, artist, 5)
|
||||
.then((tracks) => setCatalogResults(tracks))
|
||||
.catch(() => {
|
||||
// Silently fail — catalog search is a nice-to-have
|
||||
})
|
||||
// Fire community version check in parallel (non-blocking)
|
||||
api.checkCommunityVersions(artist, title)
|
||||
.then((data) => setCommunityData(data))
|
||||
@@ -227,62 +220,68 @@ export function AudioSourceStep({
|
||||
const groupedResults = useMemo(() => groupResults(results), [results])
|
||||
const otherResultsCount = results.length > 0 && confidence.bestResult ? results.length - 1 : 0
|
||||
|
||||
// Fuzzy "Did you mean?" — triggers when audio search is poor AND catalog didn't find a close title match
|
||||
const catalogHasExactTitleMatch = useMemo(() =>
|
||||
catalogResults.some((t) => t.track_name.toLowerCase() === title.toLowerCase()),
|
||||
[catalogResults, title]
|
||||
)
|
||||
// Match judge: runs once the audio search resolves (so it sees the confidence
|
||||
// tier). Deterministic+catalog formatting fixes apply silently; the light AI
|
||||
// layer only fires server-side when those aren't confident.
|
||||
useEffect(() => {
|
||||
if (fuzzyTriggered.current) return
|
||||
if (isSearching) return // Wait for audio search to complete
|
||||
if (catalogHasExactTitleMatch) return // Catalog found the exact song — no typo
|
||||
if (confidence.tier <= 2) return // Audio search found good results — no typo likely
|
||||
|
||||
fuzzyTriggered.current = true
|
||||
// Try artist name as query first, fall back to title if that returns nothing
|
||||
api.searchCatalogTracks(artist, undefined, 20)
|
||||
.then((tracks) => {
|
||||
const matches = findFuzzyMatches(title, tracks)
|
||||
if (matches.length > 0) {
|
||||
setFuzzySuggestion(matches[0])
|
||||
setFuzzyAlternatives(matches.slice(1))
|
||||
return
|
||||
if (judgeTriggered.current) return
|
||||
if (isSearching) return // Wait for the audio search so the tier is known
|
||||
judgeTriggered.current = true
|
||||
api.matchJudge(artist, title, confidence.tier)
|
||||
.then((v) => {
|
||||
setVerdict(v)
|
||||
if (v.kind === 'cosmetic' && v.confident) {
|
||||
// Same song, formatting only — apply silently, never re-search.
|
||||
applyCorrection(v.canonical_artist, v.canonical_title, false)
|
||||
} else if (v.kind === 'content' && v.confident) {
|
||||
// Real character change — apply, and re-search only if the typo'd
|
||||
// search came back weak (tier 3) so we fetch better audio for the fix.
|
||||
applyCorrection(v.canonical_artist, v.canonical_title, confidence.tier >= 3)
|
||||
}
|
||||
// Fallback: search by title (handles case where artist field has garbage like "fox stevenson bruises")
|
||||
return api.searchCatalogTracks(title, undefined, 20).then((titleTracks) => {
|
||||
const titleMatches = findFuzzyMatches(title, titleTracks, 0.6, true, artist)
|
||||
if (titleMatches.length > 0) {
|
||||
setFuzzySuggestion(titleMatches[0])
|
||||
setFuzzyAlternatives(titleMatches.slice(1))
|
||||
}
|
||||
})
|
||||
// ambiguous / unconfident content / none → render an ask (no auto-apply)
|
||||
})
|
||||
.catch(() => {
|
||||
// Silently fail
|
||||
// Silently fail — matching is a nice-to-have
|
||||
})
|
||||
}, [isSearching, catalogResults, confidence.tier, artist, title])
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [isSearching, artist, title])
|
||||
|
||||
function handleFuzzyAccept(track?: CatalogTrackResult) {
|
||||
const chosen = track || fuzzySuggestion
|
||||
if (!chosen) return
|
||||
// Update parent's artist/title
|
||||
onArtistTitleCorrection(chosen.artist_name, chosen.track_name)
|
||||
// Reset and restart search with corrected name
|
||||
setFuzzySuggestion(null)
|
||||
setFuzzyAlternatives([])
|
||||
setFuzzyDismissed(true)
|
||||
setResults([])
|
||||
setSearchStatus({ phase: 'searching', attempt: 1 })
|
||||
setCatalogResults([])
|
||||
setCatalogDismissed(false)
|
||||
setCommunityData(null)
|
||||
setCommunityDismissed(false)
|
||||
setShowOtherOptions(false)
|
||||
searchTriggered.current = false
|
||||
fuzzyTriggered.current = false
|
||||
// doSearch (and catalog/community searches) will re-fire via the useEffect
|
||||
// when the parent re-renders us with corrected artist/title props, since
|
||||
// searchTriggered.current is reset and doSearch is recreated with new props.
|
||||
// Apply a corrected artist/title. reSearch=true re-runs the audio search with
|
||||
// the corrected terms; the verdict notice stays visible across the re-search.
|
||||
function applyCorrection(newArtist: string, newTitle: string, reSearch: boolean) {
|
||||
if (newArtist === artist && newTitle === title) return
|
||||
setAppliedFrom({ artist, title })
|
||||
onArtistTitleCorrection(newArtist, newTitle)
|
||||
if (reSearch) {
|
||||
setResults([])
|
||||
setSearchStatus({ phase: 'searching', attempt: 1 })
|
||||
setCommunityData(null)
|
||||
setCommunityDismissed(false)
|
||||
setShowOtherOptions(false)
|
||||
// Keep judgeTriggered=true: don't re-judge the corrected terms. doSearch
|
||||
// re-fires via the mount effect when the parent re-renders with the
|
||||
// corrected artist/title props (searchTriggered is reset below).
|
||||
searchTriggered.current = false
|
||||
}
|
||||
}
|
||||
|
||||
// User accepts an ambiguous "Did you mean?" suggestion (always re-search).
|
||||
function handleSuggestionAccept(newArtist: string, newTitle: string) {
|
||||
setVerdict({
|
||||
kind: 'content', confident: true,
|
||||
canonical_artist: newArtist, canonical_title: newTitle,
|
||||
alternatives: [], engine: 'ai', reason: '',
|
||||
})
|
||||
applyCorrection(newArtist, newTitle, true)
|
||||
}
|
||||
|
||||
// User undoes an auto-applied correction — restore exactly what they typed.
|
||||
function handleUndoCorrection() {
|
||||
if (!appliedFrom) return
|
||||
const prev = appliedFrom
|
||||
setAppliedFrom(null)
|
||||
setVerdict(null)
|
||||
onArtistTitleCorrection(prev.artist, prev.title)
|
||||
}
|
||||
|
||||
function handleSelect(index: number) {
|
||||
@@ -428,17 +427,14 @@ export function AudioSourceStep({
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
{/* Song name suggestions from catalog */}
|
||||
{catalogResults.length > 0 && !catalogDismissed && (
|
||||
<SongSuggestionPanel
|
||||
results={catalogResults}
|
||||
artist={artist}
|
||||
title={title}
|
||||
onSelect={(track) => {
|
||||
onArtistTitleCorrection(track.artist_name, track.track_name)
|
||||
setCatalogDismissed(true)
|
||||
}}
|
||||
onDismiss={() => setCatalogDismissed(true)}
|
||||
{/* Artist/title formatting tidy + did-you-mean */}
|
||||
{verdict && !verdictDismissed && (
|
||||
<MatchNotice
|
||||
verdict={verdict}
|
||||
appliedFrom={appliedFrom}
|
||||
onAccept={handleSuggestionAccept}
|
||||
onUndo={handleUndoCorrection}
|
||||
onDismiss={() => setVerdictDismissed(true)}
|
||||
/>
|
||||
)}
|
||||
|
||||
@@ -450,16 +446,6 @@ export function AudioSourceStep({
|
||||
/>
|
||||
)}
|
||||
|
||||
{/* "Did you mean?" fuzzy correction banner */}
|
||||
{fuzzySuggestion && !fuzzyDismissed && (
|
||||
<DidYouMeanBanner
|
||||
suggestion={fuzzySuggestion}
|
||||
alternatives={fuzzyAlternatives}
|
||||
onAccept={handleFuzzyAccept}
|
||||
onDismiss={() => setFuzzyDismissed(true)}
|
||||
/>
|
||||
)}
|
||||
|
||||
{/* Error display */}
|
||||
{error && (
|
||||
<div className="text-sm rounded p-3 text-red-400 bg-red-500/10">
|
||||
@@ -1034,191 +1020,6 @@ function ResultRow({
|
||||
)
|
||||
}
|
||||
|
||||
/** Song name suggestion panel — two modes: exact match confirmation vs correction suggestions */
|
||||
function SongSuggestionPanel({
|
||||
results,
|
||||
artist,
|
||||
title,
|
||||
onSelect,
|
||||
onDismiss,
|
||||
}: {
|
||||
results: CatalogTrackResult[]
|
||||
artist: string
|
||||
title: string
|
||||
onSelect: (track: CatalogTrackResult) => void
|
||||
onDismiss: () => void
|
||||
}) {
|
||||
const [showOthers, setShowOthers] = useState(false)
|
||||
|
||||
// Check if any result is a case-insensitive match for the user's input
|
||||
const hasExactMatch = results.some(
|
||||
(t) => t.artist_name.toLowerCase() === artist.toLowerCase() && t.track_name.toLowerCase() === title.toLowerCase()
|
||||
)
|
||||
// Results that differ from what the user typed (potential corrections)
|
||||
const corrections = results.filter(
|
||||
(t) => !(t.artist_name === artist && t.track_name === title)
|
||||
)
|
||||
// If the user already typed exactly right (case-sensitive), nothing to show
|
||||
const hasExactCaseSensitiveMatch = results.some(
|
||||
(t) => t.artist_name === artist && t.track_name === title
|
||||
)
|
||||
|
||||
if (hasExactCaseSensitiveMatch && corrections.length === 0) {
|
||||
// Perfect match, no alternatives — don't show the panel at all
|
||||
return null
|
||||
}
|
||||
|
||||
// Find the exact case-insensitive match (for casing correction)
|
||||
const exactCaseInsensitiveMatch = hasExactMatch
|
||||
? results.find(
|
||||
(t) => t.artist_name.toLowerCase() === artist.toLowerCase() && t.track_name.toLowerCase() === title.toLowerCase()
|
||||
)
|
||||
: null
|
||||
const hasCasingDifference = exactCaseInsensitiveMatch && (
|
||||
exactCaseInsensitiveMatch.artist_name !== artist || exactCaseInsensitiveMatch.track_name !== title
|
||||
)
|
||||
// "Other" corrections excludes the exact case-insensitive match
|
||||
const otherCorrections = corrections.filter(
|
||||
(t) => !exactCaseInsensitiveMatch || t.artist_name !== exactCaseInsensitiveMatch.artist_name || t.track_name !== exactCaseInsensitiveMatch.track_name
|
||||
)
|
||||
|
||||
// Mode 1: User's input matches a song (case-insensitive) — show confirmation with optional alternatives
|
||||
if (hasExactMatch) {
|
||||
return (
|
||||
<div
|
||||
className="border rounded-lg overflow-hidden border-green-500/30 bg-green-500/5"
|
||||
data-testid="song-suggestion-panel"
|
||||
>
|
||||
<div className="px-3 py-2 flex items-center justify-between bg-green-500/10">
|
||||
<div className="flex items-center gap-2">
|
||||
<CheckCircle2 className="w-3.5 h-3.5 text-green-400" />
|
||||
<span className="text-xs font-semibold text-green-400">
|
||||
Song found in our database
|
||||
</span>
|
||||
</div>
|
||||
<button
|
||||
onClick={onDismiss}
|
||||
className="text-[10px] flex items-center gap-1 hover:opacity-80"
|
||||
style={{ color: 'var(--text-muted)' }}
|
||||
>
|
||||
<X className="w-3 h-3" />
|
||||
Dismiss
|
||||
</button>
|
||||
</div>
|
||||
<div className="px-3 py-2">
|
||||
{hasCasingDifference && exactCaseInsensitiveMatch ? (
|
||||
<div>
|
||||
<p className="text-[10px] mb-1.5" style={{ color: 'var(--text-muted)' }}>
|
||||
Use the official formatting?
|
||||
</p>
|
||||
<CatalogTrackList tracks={[exactCaseInsensitiveMatch]} onSelect={onSelect} />
|
||||
</div>
|
||||
) : (
|
||||
<p className="text-[10px]" style={{ color: 'var(--text-muted)' }}>
|
||||
Your artist and title matched a song in our database — looking good!
|
||||
</p>
|
||||
)}
|
||||
{otherCorrections.length > 0 && (
|
||||
<div className="mt-2">
|
||||
<button
|
||||
onClick={() => setShowOthers(!showOthers)}
|
||||
className="flex items-center gap-1 text-[10px] hover:opacity-80"
|
||||
style={{ color: 'var(--text-muted)' }}
|
||||
>
|
||||
{showOthers ? (
|
||||
<><ChevronUp className="w-3 h-3" /> Hide other matches</>
|
||||
) : (
|
||||
<><ChevronDown className="w-3 h-3" /> Show {otherCorrections.length} other match{otherCorrections.length !== 1 ? 'es' : ''}</>
|
||||
)}
|
||||
</button>
|
||||
{showOthers && (
|
||||
<div className="mt-1.5 space-y-1">
|
||||
<CatalogTrackList tracks={otherCorrections} onSelect={onSelect} />
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
// Mode 2: No exact match — show corrections prominently
|
||||
return (
|
||||
<div
|
||||
className="border rounded-lg overflow-hidden border-blue-500/30 bg-blue-500/5"
|
||||
data-testid="song-suggestion-panel"
|
||||
>
|
||||
<div className="px-3 py-2 flex items-center justify-between bg-blue-500/10">
|
||||
<div className="flex items-center gap-2">
|
||||
<Search className="w-3.5 h-3.5 text-blue-400" />
|
||||
<span className="text-xs font-semibold text-blue-400">
|
||||
Use official artist/title formatting?
|
||||
</span>
|
||||
</div>
|
||||
<button
|
||||
onClick={onDismiss}
|
||||
className="text-[10px] flex items-center gap-1 hover:opacity-80"
|
||||
style={{ color: 'var(--text-muted)' }}
|
||||
>
|
||||
<X className="w-3 h-3" />
|
||||
Dismiss
|
||||
</button>
|
||||
</div>
|
||||
<div className="px-3 py-2">
|
||||
<p className="text-[10px] mb-2" style={{ color: 'var(--text-muted)' }}>
|
||||
We found these in our song database. Click one to use the official artist/title formatting:
|
||||
</p>
|
||||
<CatalogTrackList tracks={corrections.length > 0 ? corrections : results} onSelect={onSelect} />
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
/** Reusable list of clickable catalog track rows */
|
||||
function CatalogTrackList({
|
||||
tracks,
|
||||
onSelect,
|
||||
}: {
|
||||
tracks: CatalogTrackResult[]
|
||||
onSelect: (track: CatalogTrackResult) => void
|
||||
}) {
|
||||
// Deduplicate by artist + track name (Spotify often returns the same song from different albums)
|
||||
const uniqueTracks = tracks.filter((t, i, arr) =>
|
||||
arr.findIndex((x) => x.artist_name === t.artist_name && x.track_name === t.track_name) === i
|
||||
)
|
||||
return (
|
||||
<div className="space-y-1">
|
||||
{uniqueTracks.map((track, i) => {
|
||||
const duration = track.duration_ms
|
||||
? `${Math.floor(track.duration_ms / 60000)}:${Math.floor((track.duration_ms % 60000) / 1000).toString().padStart(2, "0")}`
|
||||
: null
|
||||
return (
|
||||
<button
|
||||
key={track.track_id || `${track.artist_name}-${track.track_name}-${i}`}
|
||||
onClick={() => onSelect(track)}
|
||||
className="w-full text-left px-2.5 py-2 rounded-md text-xs flex items-center justify-between gap-2 transition-colors hover:bg-blue-500/10"
|
||||
style={{ color: 'var(--text)' }}
|
||||
>
|
||||
<span className="min-w-0">
|
||||
<span className="font-medium">{track.artist_name}</span>
|
||||
<span style={{ color: 'var(--text-muted)' }}> — </span>
|
||||
<span>{track.track_name}</span>
|
||||
</span>
|
||||
<span className="flex items-center gap-2 shrink-0">
|
||||
{duration && (
|
||||
<span className="text-[10px]" style={{ color: 'var(--text-muted)' }}>{duration}</span>
|
||||
)}
|
||||
<span className="text-[10px] px-1.5 py-0.5 rounded bg-blue-500/15 text-blue-400 font-medium">
|
||||
Use
|
||||
</span>
|
||||
</span>
|
||||
</button>
|
||||
)
|
||||
})}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
/** Compute similarity between two strings using longest common subsequence ratio */
|
||||
export function stringSimilarity(a: string, b: string): number {
|
||||
@@ -1274,93 +1075,6 @@ export function findFuzzyMatches(
|
||||
.filter((t, i, arr) => arr.findIndex((x) => x.artist_name === t.artist_name && x.track_name === t.track_name) === i)
|
||||
}
|
||||
|
||||
/** "Did you mean?" banner for typo correction */
|
||||
function DidYouMeanBanner({
|
||||
suggestion,
|
||||
alternatives,
|
||||
onAccept,
|
||||
onDismiss,
|
||||
}: {
|
||||
suggestion: CatalogTrackResult
|
||||
alternatives: CatalogTrackResult[]
|
||||
onAccept: (track?: CatalogTrackResult) => void
|
||||
onDismiss: () => void
|
||||
}) {
|
||||
const [showAlternatives, setShowAlternatives] = useState(false)
|
||||
return (
|
||||
<div
|
||||
className="border rounded-lg overflow-hidden border-amber-500/40 bg-amber-500/5"
|
||||
data-testid="did-you-mean-banner"
|
||||
>
|
||||
<div className="px-3 py-2 flex items-center justify-between bg-amber-500/10">
|
||||
<div className="flex items-center gap-2">
|
||||
<AlertTriangle className="w-3.5 h-3.5 text-amber-400" />
|
||||
<span className="text-xs font-semibold text-amber-400">
|
||||
Did you mean?
|
||||
</span>
|
||||
</div>
|
||||
<button
|
||||
onClick={onDismiss}
|
||||
className="text-[10px] flex items-center gap-1 hover:opacity-80"
|
||||
style={{ color: 'var(--text-muted)' }}
|
||||
>
|
||||
<X className="w-3 h-3" />
|
||||
No thanks
|
||||
</button>
|
||||
</div>
|
||||
<div className="px-3 py-3">
|
||||
<p className="text-xs" style={{ color: 'var(--text-muted)' }}>
|
||||
We couldn't find great audio sources. Did you mean:
|
||||
</p>
|
||||
<button
|
||||
onClick={() => onAccept()}
|
||||
className="mt-2 w-full text-left px-3 py-2.5 rounded-md flex items-center justify-between gap-2 transition-colors border border-amber-500/30 hover:bg-amber-500/10"
|
||||
>
|
||||
<span className="text-sm" style={{ color: 'var(--text)' }}>
|
||||
<span className="font-semibold">{suggestion.artist_name}</span>
|
||||
<span style={{ color: 'var(--text-muted)' }}> — </span>
|
||||
<span className="font-semibold">{suggestion.track_name}</span>
|
||||
</span>
|
||||
<span className="text-xs px-2 py-1 rounded bg-amber-500/15 text-amber-400 font-medium shrink-0">
|
||||
Yes, search again
|
||||
</span>
|
||||
</button>
|
||||
{alternatives.length > 0 && (
|
||||
<div className="mt-2">
|
||||
<button
|
||||
onClick={() => setShowAlternatives(!showAlternatives)}
|
||||
className="text-[11px] flex items-center gap-1 hover:opacity-80"
|
||||
style={{ color: 'var(--text-muted)' }}
|
||||
>
|
||||
<ChevronDown className={`w-3 h-3 transition-transform ${showAlternatives ? 'rotate-180' : ''}`} />
|
||||
{showAlternatives ? 'Hide' : 'Show'} {alternatives.length} other match{alternatives.length > 1 ? 'es' : ''}
|
||||
</button>
|
||||
{showAlternatives && (
|
||||
<div className="mt-1.5 space-y-1">
|
||||
{alternatives.slice(0, 5).map((alt, i) => (
|
||||
<button
|
||||
key={i}
|
||||
onClick={() => onAccept(alt)}
|
||||
className="w-full text-left px-3 py-2 rounded-md flex items-center justify-between gap-2 transition-colors border border-[var(--card-border)] hover:bg-amber-500/10 hover:border-amber-500/30"
|
||||
>
|
||||
<span className="text-xs" style={{ color: 'var(--text)' }}>
|
||||
<span className="font-medium">{alt.artist_name}</span>
|
||||
<span style={{ color: 'var(--text-muted)' }}> — </span>
|
||||
<span className="font-medium">{alt.track_name}</span>
|
||||
</span>
|
||||
<span className="text-[10px] px-1.5 py-0.5 rounded bg-amber-500/10 text-amber-400 shrink-0">
|
||||
Search
|
||||
</span>
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
/** Contextual guidance when search returns no results */
|
||||
function NoResultsSection() {
|
||||
@@ -1543,3 +1257,94 @@ function FallbackSection({
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
/** Match-judge notice: a quiet auto-applied tidy/correction line (with undo),
|
||||
* or an ask-first "Did you mean?" prompt for ambiguous cases. */
|
||||
function MatchNotice({
|
||||
verdict,
|
||||
appliedFrom,
|
||||
onAccept,
|
||||
onUndo,
|
||||
onDismiss,
|
||||
}: {
|
||||
verdict: MatchJudgeVerdict
|
||||
appliedFrom: { artist: string; title: string } | null
|
||||
onAccept: (artist: string, title: string) => void
|
||||
onUndo: () => void
|
||||
onDismiss: () => void
|
||||
}) {
|
||||
const t = useTranslations('jobFlow')
|
||||
const canonical = `${verdict.canonical_artist} — ${verdict.canonical_title}`
|
||||
|
||||
// Auto-applied cosmetic tidy or confident content correction → quiet line + undo.
|
||||
if (appliedFrom && (verdict.kind === 'cosmetic' || verdict.kind === 'content')) {
|
||||
const typed = `${appliedFrom.artist} — ${appliedFrom.title}`
|
||||
return (
|
||||
<div
|
||||
className="flex items-center gap-2 text-xs px-3 py-2 rounded-lg"
|
||||
style={{ backgroundColor: 'var(--secondary)', color: 'var(--text-muted)' }}
|
||||
data-testid="match-tidy-notice"
|
||||
>
|
||||
<Check className="w-3.5 h-3.5 text-green-400 shrink-0" />
|
||||
<span className="flex-1">
|
||||
{verdict.kind === 'content'
|
||||
? t('matchCorrectedTo', { value: canonical, typed })
|
||||
: t('matchTidiedTo', { value: canonical })}
|
||||
</span>
|
||||
<button
|
||||
type="button"
|
||||
onClick={onUndo}
|
||||
className="underline shrink-0"
|
||||
style={{ color: 'var(--brand-pink)' }}
|
||||
>
|
||||
{verdict.kind === 'content' ? t('matchUndo') : t('matchKeepMine')}
|
||||
</button>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
// Ambiguous (or unconfident content) → ask before changing anything.
|
||||
if (verdict.kind === 'ambiguous' || verdict.kind === 'content') {
|
||||
const options = [
|
||||
{ artist: verdict.canonical_artist, title: verdict.canonical_title },
|
||||
...verdict.alternatives,
|
||||
].filter((o) => o.artist && o.title)
|
||||
if (options.length === 0) return null
|
||||
return (
|
||||
<div
|
||||
className="border rounded-lg p-3 border-amber-500/30 bg-amber-500/5"
|
||||
data-testid="match-didyoumean"
|
||||
>
|
||||
<div className="flex items-center justify-between">
|
||||
<span className="flex items-center gap-2 text-sm font-medium text-amber-400">
|
||||
<Lightbulb className="w-4 h-4" />
|
||||
{t('matchDidYouMean')}
|
||||
</span>
|
||||
<button
|
||||
type="button"
|
||||
onClick={onDismiss}
|
||||
aria-label="Dismiss"
|
||||
className="opacity-60 hover:opacity-100"
|
||||
>
|
||||
<X className="w-4 h-4" />
|
||||
</button>
|
||||
</div>
|
||||
<div className="mt-2 flex flex-col gap-1.5">
|
||||
{options.map((o, i) => (
|
||||
<button
|
||||
key={`${o.artist}-${o.title}-${i}`}
|
||||
type="button"
|
||||
onClick={() => onAccept(o.artist, o.title)}
|
||||
className="text-left text-sm px-2.5 py-1.5 rounded-md hover:bg-amber-500/10 transition-colors"
|
||||
style={{ color: 'var(--text)' }}
|
||||
>
|
||||
{o.artist} — {o.title}
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
return null
|
||||
}
|
||||
@@ -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>
|
||||
|
||||
@@ -5,7 +5,6 @@ import { useTranslations } from 'next-intl'
|
||||
import { Card } from '@/components/ui/card'
|
||||
import { Button } from '@/components/ui/button'
|
||||
import { Badge } from '@/components/ui/badge'
|
||||
import { ScrollArea } from '@/components/ui/scroll-area'
|
||||
import {
|
||||
Tooltip,
|
||||
TooltipContent,
|
||||
@@ -58,7 +57,6 @@ export default function AutoCorrectPanel({
|
||||
const {
|
||||
suggestions,
|
||||
decisions,
|
||||
model,
|
||||
pendingCount,
|
||||
acceptedCount,
|
||||
accept,
|
||||
@@ -86,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 && (
|
||||
@@ -122,7 +117,10 @@ export default function AutoCorrectPanel({
|
||||
</div>
|
||||
|
||||
{!collapsed && suggestions.length > 0 && (
|
||||
<ScrollArea className="max-h-64 border-t">
|
||||
// Plain overflow div, NOT the ScrollArea component: its Radix root
|
||||
// has no overflow-hidden, so a max-height there doesn't clip and
|
||||
// long suggestion lists spill over the panel border.
|
||||
<div className="max-h-64 overflow-y-auto border-t">
|
||||
<ul className="divide-y">
|
||||
{suggestions.map((s) => {
|
||||
const decision = decisions[s.id]
|
||||
@@ -149,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>
|
||||
@@ -285,7 +258,7 @@ export default function AutoCorrectPanel({
|
||||
)
|
||||
})}
|
||||
</ul>
|
||||
</ScrollArea>
|
||||
</div>
|
||||
)}
|
||||
</Card>
|
||||
)
|
||||
|
||||
@@ -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)) {
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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", () => {
|
||||
|
||||
+68
-2
@@ -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}`;
|
||||
@@ -473,6 +508,18 @@ export interface CommunityCheckResponse {
|
||||
best_youtube_url: string | null;
|
||||
}
|
||||
|
||||
export type MatchJudgeKind = 'cosmetic' | 'content' | 'ambiguous' | 'none';
|
||||
|
||||
export interface MatchJudgeVerdict {
|
||||
kind: MatchJudgeKind;
|
||||
confident: boolean;
|
||||
canonical_artist: string;
|
||||
canonical_title: string;
|
||||
alternatives: { artist: string; title: string }[];
|
||||
engine: 'deterministic' | 'catalog' | 'ai';
|
||||
reason: string;
|
||||
}
|
||||
|
||||
export const api = {
|
||||
/**
|
||||
* List all jobs
|
||||
@@ -1285,6 +1332,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),
|
||||
});
|
||||
@@ -1573,6 +1625,20 @@ export const api = {
|
||||
return handleResponse(response);
|
||||
},
|
||||
|
||||
async matchJudge(artist: string, title: string, audioConfidenceTier?: number): Promise<MatchJudgeVerdict> {
|
||||
const body: Record<string, unknown> = { artist, title };
|
||||
if (audioConfidenceTier != null) body.audio_confidence_tier = audioConfidenceTier;
|
||||
const response = await fetch(`${API_BASE_URL}/api/catalog/match-judge`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
...getAuthHeaders(),
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
body: JSON.stringify(body),
|
||||
});
|
||||
return handleResponse(response);
|
||||
},
|
||||
|
||||
async changeVisibility(jobId: string, targetVisibility: 'public' | 'private'): Promise<ChangeVisibilityResponse> {
|
||||
const response = await fetch(`${API_BASE_URL}/api/jobs/${jobId}/change-visibility`, {
|
||||
method: 'POST',
|
||||
|
||||
@@ -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,
|
||||
}
|
||||
}
|
||||
@@ -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.
|
||||
|
||||
+25
-12
@@ -533,7 +533,12 @@
|
||||
"pasteUrlButton": "لصق رابط",
|
||||
"urlSupportedSitesHint": "يعمل مع YouTube و Facebook و SoundCloud و TikTok و Vimeo ومئات المواقع الأخرى.",
|
||||
"urlSupportedSitesLink": "عرض جميع المواقع المدعومة",
|
||||
"useThisUrl": "استخدام هذا الرابط"
|
||||
"useThisUrl": "استخدام هذا الرابط",
|
||||
"matchCorrectedTo": "تم التصحيح إلى {value} — لقد كتبت “{typed}”",
|
||||
"matchDidYouMean": "هل تقصد؟",
|
||||
"matchKeepMine": "الاحتفاظ بما كتبته",
|
||||
"matchTidiedTo": "تم التنسيق إلى {value}",
|
||||
"matchUndo": "تراجع"
|
||||
},
|
||||
"jobStatus": {
|
||||
"settingUp": "جاري الإعداد",
|
||||
@@ -780,7 +785,13 @@
|
||||
"fadeIn": "ظهور تدريجي",
|
||||
"fadeInSelection": "ظهور تدريجي في المنطقة المحددة",
|
||||
"fadeOut": "تلاشي تدريجي",
|
||||
"fadeOutSelection": "تلاشي تدريجي في المنطقة المحددة"
|
||||
"fadeOutSelection": "تلاشي تدريجي في المنطقة المحددة",
|
||||
"fadeInDisabledHint": "لإضافة تأثير الظهور التدريجي، حدد منطقة تبدأ من بداية المسار تماماً",
|
||||
"fadeOutDisabledHint": "لإضافة تأثير التلاشي التدريجي، حدد منطقة تنتهي عند نهاية المسار تماماً",
|
||||
"trimEndDisabledHint": "لقص النهاية، حدد منطقة تنتهي عند نهاية المسار تماماً",
|
||||
"trimEndSelection": "إزالة كل شيء بعد التحديد",
|
||||
"trimStartDisabledHint": "لقص البداية، حدد منطقة تبدأ من بداية المسار تماماً",
|
||||
"trimStartSelection": "إزالة كل شيء قبل التحديد"
|
||||
},
|
||||
"audioEditRestore": {
|
||||
"title": "جلسات تعديل الصوت المحفوظة",
|
||||
@@ -807,7 +818,7 @@
|
||||
"acceptAll": "قبول الكل",
|
||||
"revertAll": "تراجع عن الكل",
|
||||
"undoAll": "تراجع عن الكل",
|
||||
"resetAllChanges": "إعادة تعيين جميع التغييرات إلى الكلمات الأصلية المصححة بالذكاء الاصطناعي",
|
||||
"resetAllChanges": "إعادة تعيين جميع التغييرات والعودة إلى الكلمات المصححة الأصلية",
|
||||
"undo": "تراجع",
|
||||
"redo": "إعادة",
|
||||
"findReplace": "بحث/استبدال",
|
||||
@@ -821,8 +832,8 @@
|
||||
"audioLoadError": "تعذر تحميل الصوت",
|
||||
"audioStillLoading": "لا يزال الصوت قيد التحميل...",
|
||||
"loadingAudio": "جاري تحميل الصوت...",
|
||||
"autoCorrect": "اقتراحات الذكاء الاصطناعي",
|
||||
"autoCorrectDesc": "احصل على اقتراحات للتصحيح بالذكاء الاصطناعي من خلال مقارنة النص المنسوخ مع الكلمات المرجعية. لن يتم تغيير أي شيء حتى توافق على كل اقتراح."
|
||||
"autoCorrect": "التصحيح التلقائي",
|
||||
"autoCorrectDesc": "إنشاء اقتراحات تصحيح من خلال مقارنة التفريغ الصوتي مع الكلمات المرجعية. لن يتم تغيير أي شيء حتى توافق على كل اقتراح."
|
||||
},
|
||||
"guidance": {
|
||||
"showTips": "إظهار النصائح",
|
||||
@@ -1294,18 +1305,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 +1324,7 @@
|
||||
"running": "جاري تحليل الكلمات... يستغرق هذا عادةً بين 15 و 60 ثانية.",
|
||||
"staleHint": "تم تعديل هذه الكلمات بعد إنشاء الاقتراحات، لذا لم يعد هذا الاقتراح صالحاً.",
|
||||
"summary": "{total} اقتراحات · {pending} قيد الانتظار · {accepted} مقبولة",
|
||||
"title": "اقتراحات التصحيح بالذكاء الاصطناعي",
|
||||
"title": "اقتراحات التصحيح التلقائي",
|
||||
"undo": "التراجع عن هذا الاقتراح",
|
||||
"cancel": "إلغاء",
|
||||
"close": "إغلاق",
|
||||
@@ -1321,9 +1332,11 @@
|
||||
"compareHint": "أبطأ وأعلى تكلفة، لكنه يوضح الاقتراحات التي تتفق عليها عدة نماذج",
|
||||
"compareLabel": "مقارنة عدة نماذج للذكاء الاصطناعي",
|
||||
"conflictBadge": "بديل",
|
||||
"conflictTooltip": "تختلف النماذج حول هذه الكلمات — قبول أحد البدائل يعني رفض الأخرى.",
|
||||
"conflictTooltip": "توجد اقتراحات مختلفة لهذه الكلمات — قبول أحد الخيارات يؤدي إلى رفض الخيارات الأخرى.",
|
||||
"consensusBadge": "{consensus}/{total} من النماذج",
|
||||
"consensusTooltip": "مقترح من: {models}"
|
||||
"consensusTooltip": "مقترح من: {models}",
|
||||
"cachedBadge": "مخزن مؤقتاً",
|
||||
"cachedTooltip": "تمت الاستعادة من معالجة سابقة لنفس الكلمات — لم يتم احتساب أي تكلفة للذكاء الاصطناعي."
|
||||
}
|
||||
},
|
||||
"instrumentalReview": {
|
||||
|
||||
+25
-12
@@ -533,7 +533,12 @@
|
||||
"pasteUrlButton": "Enganxa un enllaç",
|
||||
"urlSupportedSitesHint": "Funciona amb YouTube, Facebook, SoundCloud, TikTok, Vimeo i centenars de llocs més.",
|
||||
"urlSupportedSitesLink": "Consulta tots els llocs compatibles",
|
||||
"useThisUrl": "Utilitza aquest URL"
|
||||
"useThisUrl": "Utilitza aquest URL",
|
||||
"matchCorrectedTo": "Corregit a {value} — has escrit “{typed}”",
|
||||
"matchDidYouMean": "Volies dir?",
|
||||
"matchKeepMine": "mantenir el que he escrit",
|
||||
"matchTidiedTo": "Ajustat a {value}",
|
||||
"matchUndo": "Desfer"
|
||||
},
|
||||
"jobStatus": {
|
||||
"settingUp": "Configurant",
|
||||
@@ -780,7 +785,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 +818,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 +832,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 +1305,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 +1324,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 +1332,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": {
|
||||
|
||||
+25
-12
@@ -533,7 +533,12 @@
|
||||
"pasteUrlButton": "Vložit odkaz",
|
||||
"urlSupportedSitesHint": "Funguje se službami YouTube, Facebook, SoundCloud, TikTok, Vimeo a stovkami dalších webů.",
|
||||
"urlSupportedSitesLink": "Zobrazit všechny podporované weby",
|
||||
"useThisUrl": "Použít tuto URL"
|
||||
"useThisUrl": "Použít tuto URL",
|
||||
"matchCorrectedTo": "Opraveno na {value} — zadal jsi „{typed}“",
|
||||
"matchDidYouMean": "Měl jsi na mysli?",
|
||||
"matchKeepMine": "ponechat můj text",
|
||||
"matchTidiedTo": "Upraveno na {value}",
|
||||
"matchUndo": "Zpět"
|
||||
},
|
||||
"jobStatus": {
|
||||
"settingUp": "Nastavování",
|
||||
@@ -780,7 +785,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 +818,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 +832,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 +1305,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 +1324,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 +1332,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": {
|
||||
|
||||
+25
-12
@@ -533,7 +533,12 @@
|
||||
"pasteUrlButton": "Indsæt et link",
|
||||
"urlSupportedSitesHint": "Fungerer med YouTube, Facebook, SoundCloud, TikTok, Vimeo og hundredvis af andre sider.",
|
||||
"urlSupportedSitesLink": "Se alle understøttede sider",
|
||||
"useThisUrl": "Brug denne URL"
|
||||
"useThisUrl": "Brug denne URL",
|
||||
"matchCorrectedTo": "Rettet til {value} — du skrev “{typed}”",
|
||||
"matchDidYouMean": "Mente du?",
|
||||
"matchKeepMine": "behold det, jeg skrev",
|
||||
"matchTidiedTo": "Finpudset til {value}",
|
||||
"matchUndo": "Fortryd"
|
||||
},
|
||||
"jobStatus": {
|
||||
"settingUp": "Sætter op",
|
||||
@@ -780,7 +785,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 +818,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 +832,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 +1305,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 +1324,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 +1332,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": {
|
||||
|
||||
+25
-12
@@ -533,7 +533,12 @@
|
||||
"pasteUrlButton": "Link einfügen",
|
||||
"urlSupportedSitesHint": "Funktioniert mit YouTube, Facebook, SoundCloud, TikTok, Vimeo und Hunderten anderen Seiten.",
|
||||
"urlSupportedSitesLink": "Alle unterstützten Seiten ansehen",
|
||||
"useThisUrl": "Diese URL verwenden"
|
||||
"useThisUrl": "Diese URL verwenden",
|
||||
"matchCorrectedTo": "Korrigiert zu {value} – du hast „{typed}“ eingegeben",
|
||||
"matchDidYouMean": "Meintest du?",
|
||||
"matchKeepMine": "meine Eingabe behalten",
|
||||
"matchTidiedTo": "Bereinigt zu {value}",
|
||||
"matchUndo": "Rückgängig"
|
||||
},
|
||||
"jobStatus": {
|
||||
"settingUp": "Richte ein",
|
||||
@@ -780,7 +785,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 +818,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 +832,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 +1305,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 +1324,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 +1332,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": {
|
||||
|
||||
+25
-12
@@ -533,7 +533,12 @@
|
||||
"pasteUrlButton": "Επικόλλησε έναν σύνδεσμο",
|
||||
"urlSupportedSitesHint": "Λειτουργεί με YouTube, Facebook, SoundCloud, TikTok, Vimeo και εκατοντάδες άλλους ιστότοπους.",
|
||||
"urlSupportedSitesLink": "Δες όλους τους υποστηριζόμενους ιστότοπους",
|
||||
"useThisUrl": "Χρησιμοποίησε αυτό το URL"
|
||||
"useThisUrl": "Χρησιμοποίησε αυτό το URL",
|
||||
"matchCorrectedTo": "Διορθώθηκε σε {value} — πληκτρολόγησες “{typed}”",
|
||||
"matchDidYouMean": "Μήπως εννοούσες;",
|
||||
"matchKeepMine": "κράτα αυτό που πληκτρολόγησα",
|
||||
"matchTidiedTo": "Διαμορφώθηκε σε {value}",
|
||||
"matchUndo": "Αναίρεση"
|
||||
},
|
||||
"jobStatus": {
|
||||
"settingUp": "Ρύθμιση",
|
||||
@@ -780,7 +785,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 +818,7 @@
|
||||
"acceptAll": "Αποδοχή Όλων",
|
||||
"revertAll": "Επαναφορά Όλων",
|
||||
"undoAll": "Αναίρεση Όλων",
|
||||
"resetAllChanges": "Επαναφορά όλων των αλλαγών πίσω στους αρχικούς στίχους που διορθώθηκαν από το AI",
|
||||
"resetAllChanges": "Επαναφορά όλων των αλλαγών στους αρχικούς διορθωμένους στίχους",
|
||||
"undo": "Αναίρεση",
|
||||
"redo": "Επανάληψη",
|
||||
"findReplace": "Εύρεση/Αντικατάσταση",
|
||||
@@ -821,8 +832,8 @@
|
||||
"audioLoadError": "Δεν ήταν δυνατή η φόρτωση του ήχου",
|
||||
"audioStillLoading": "Ο ήχος φορτώνει ακόμα...",
|
||||
"loadingAudio": "Φόρτωση ήχου...",
|
||||
"autoCorrect": "Προτάσεις AI",
|
||||
"autoCorrectDesc": "Δημιούργησε προτάσεις διόρθωσης AI συγκρίνοντας τη μεταγραφή με τους στίχους αναφοράς. Τίποτα δεν αλλάζει μέχρι να αποδεχτείς κάθε πρόταση."
|
||||
"autoCorrect": "Αυτόματη διόρθωση",
|
||||
"autoCorrectDesc": "Δημιούργησε προτάσεις διόρθωσης συγκρίνοντας τη μεταγραφή με τους στίχους αναφοράς. Τίποτα δεν αλλάζει μέχρι να αποδεχτείς κάθε πρόταση."
|
||||
},
|
||||
"guidance": {
|
||||
"showTips": "Εμφάνιση συμβουλών",
|
||||
@@ -1294,18 +1305,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 +1324,7 @@
|
||||
"running": "Ανάλυση στίχων… αυτό συνήθως διαρκεί 15–60 δευτερόλεπτα.",
|
||||
"staleHint": "Αυτές οι λέξεις επεξεργάστηκαν μετά τη δημιουργία των προτάσεων, επομένως αυτή η πρόταση δεν ισχύει πλέον.",
|
||||
"summary": "{total} προτάσεις · {pending} σε εκκρεμότητα · {accepted} αποδεκτές",
|
||||
"title": "Προτάσεις διόρθωσης AI",
|
||||
"title": "Προτάσεις αυτόματης διόρθωσης",
|
||||
"undo": "Αναίρεση αυτής της πρότασης",
|
||||
"cancel": "Ακύρωση",
|
||||
"close": "Κλείσιμο",
|
||||
@@ -1321,9 +1332,11 @@
|
||||
"compareHint": "Πιο αργό και κοστίζει περισσότερο, αλλά δείχνει σε ποιες προτάσεις συμφωνούν πολλαπλά μοντέλα",
|
||||
"compareLabel": "Σύγκρινε πολλαπλά μοντέλα AI",
|
||||
"conflictBadge": "παραλλαγή",
|
||||
"conflictTooltip": "Τα μοντέλα διαφωνούν για αυτές τις λέξεις — αν αποδεχτείς μια παραλλαγή, απορρίπτεις τις υπόλοιπες.",
|
||||
"conflictTooltip": "Υπάρχουν διαφορετικές προτάσεις για αυτές τις λέξεις — η αποδοχή μιας παραλλαγής απορρίπτει τις υπόλοιπες.",
|
||||
"consensusBadge": "{consensus}/{total} μοντέλα",
|
||||
"consensusTooltip": "Προτάθηκε από: {models}"
|
||||
"consensusTooltip": "Προτάθηκε από: {models}",
|
||||
"cachedBadge": "προσωρινά αποθηκευμένο",
|
||||
"cachedTooltip": "Ανακτήθηκε από προηγούμενη επεξεργασία των ίδιων στίχων — δεν υπήρξε χρέωση AI."
|
||||
}
|
||||
},
|
||||
"instrumentalReview": {
|
||||
|
||||
@@ -470,6 +470,11 @@
|
||||
"createAnother": "Create Another",
|
||||
"noCreditsWarning": "You have no credits remaining. Buy credits to create new karaoke videos.",
|
||||
"buyCredits": "Buy Credits",
|
||||
"matchTidiedTo": "Tidied to {value}",
|
||||
"matchKeepMine": "keep what I typed",
|
||||
"matchCorrectedTo": "Corrected to {value} — you typed “{typed}”",
|
||||
"matchUndo": "Undo",
|
||||
"matchDidYouMean": "Did you mean?",
|
||||
"weFindBestAudio": "We find the best audio",
|
||||
"uploadAFile": "upload a file",
|
||||
"youtubeUrl": "YouTube URL",
|
||||
@@ -757,6 +762,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 +818,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 +832,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 +1293,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 +1334,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": {
|
||||
|
||||
+25
-12
@@ -533,7 +533,12 @@
|
||||
"pasteUrlButton": "Pega un enlace",
|
||||
"urlSupportedSitesHint": "Funciona con YouTube, Facebook, SoundCloud, TikTok, Vimeo y cientos de sitios más.",
|
||||
"urlSupportedSitesLink": "Ver todos los sitios compatibles",
|
||||
"useThisUrl": "Usar esta URL"
|
||||
"useThisUrl": "Usar esta URL",
|
||||
"matchCorrectedTo": "Corregido a {value} — escribiste “{typed}”",
|
||||
"matchDidYouMean": "¿Quisiste decir?",
|
||||
"matchKeepMine": "mantener lo que escribí",
|
||||
"matchTidiedTo": "Ajustado a {value}",
|
||||
"matchUndo": "Deshacer"
|
||||
},
|
||||
"jobStatus": {
|
||||
"settingUp": "Configurando",
|
||||
@@ -780,7 +785,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 +818,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 +832,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 +1305,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 +1324,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 +1332,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": {
|
||||
|
||||
+25
-12
@@ -533,7 +533,12 @@
|
||||
"pasteUrlButton": "Liitä linkki",
|
||||
"urlSupportedSitesHint": "Toimii YouTuben, Facebookin, SoundCloudin, TikTokin, Vimeon ja satojen muiden sivustojen kanssa.",
|
||||
"urlSupportedSitesLink": "Katso kaikki tuetut sivustot",
|
||||
"useThisUrl": "Käytä tätä osoitetta"
|
||||
"useThisUrl": "Käytä tätä osoitetta",
|
||||
"matchCorrectedTo": "Korjattu muotoon {value} — kirjoitit ”{typed}”",
|
||||
"matchDidYouMean": "Tarkoititko?",
|
||||
"matchKeepMine": "säilytä kirjoittamani",
|
||||
"matchTidiedTo": "Siistitty muotoon {value}",
|
||||
"matchUndo": "Kumoa"
|
||||
},
|
||||
"jobStatus": {
|
||||
"settingUp": "Asetetaan",
|
||||
@@ -780,7 +785,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 +818,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 +832,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 +1305,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 +1324,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 +1332,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": {
|
||||
|
||||
+25
-12
@@ -533,7 +533,12 @@
|
||||
"pasteUrlButton": "Coller un lien",
|
||||
"urlSupportedSitesHint": "Fonctionne avec YouTube, Facebook, SoundCloud, TikTok, Vimeo et des centaines d'autres sites.",
|
||||
"urlSupportedSitesLink": "Voir tous les sites compatibles",
|
||||
"useThisUrl": "Utiliser cette URL"
|
||||
"useThisUrl": "Utiliser cette URL",
|
||||
"matchCorrectedTo": "Corrigé en {value} — tu as tapé « {typed} »",
|
||||
"matchDidYouMean": "Tu voulais dire ?",
|
||||
"matchKeepMine": "garder ce que j'ai tapé",
|
||||
"matchTidiedTo": "Ajusté en {value}",
|
||||
"matchUndo": "Annuler"
|
||||
},
|
||||
"jobStatus": {
|
||||
"settingUp": "Configuration",
|
||||
@@ -780,7 +785,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 +818,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 +832,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 +1305,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 +1324,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 +1332,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": {
|
||||
|
||||
+25
-12
@@ -533,7 +533,12 @@
|
||||
"pasteUrlButton": "הדבקת קישור",
|
||||
"urlSupportedSitesHint": "עובד עם YouTube, Facebook, SoundCloud, TikTok, Vimeo ומאות אתרים נוספים.",
|
||||
"urlSupportedSitesLink": "לצפייה בכל האתרים הנתמכים",
|
||||
"useThisUrl": "שימוש בכתובת זו"
|
||||
"useThisUrl": "שימוש בכתובת זו",
|
||||
"matchCorrectedTo": "תוקן ל-{value} — הקלדת “{typed}”",
|
||||
"matchDidYouMean": "האם התכוונת?",
|
||||
"matchKeepMine": "להשאיר את מה שהקלדתי",
|
||||
"matchTidiedTo": "סודר ל-{value}",
|
||||
"matchUndo": "ביטול"
|
||||
},
|
||||
"jobStatus": {
|
||||
"settingUp": "מגדיר",
|
||||
@@ -780,7 +785,13 @@
|
||||
"fadeIn": "פייד אין",
|
||||
"fadeInSelection": "החלת פייד אין על האזור הנבחר",
|
||||
"fadeOut": "פייד אאוט",
|
||||
"fadeOutSelection": "החלת פייד אאוט על האזור הנבחר"
|
||||
"fadeOutSelection": "החלת פייד אאוט על האזור הנבחר",
|
||||
"fadeInDisabledHint": "כדי לבצע הגברה הדרגתית, בחרו אזור שמתחיל בדיוק בתחילת הרצועה",
|
||||
"fadeOutDisabledHint": "כדי לבצע הנמכה הדרגתית, בחרו אזור שמסתיים בדיוק בסוף הרצועה",
|
||||
"trimEndDisabledHint": "כדי לחתוך את הסוף, בחרו אזור שמסתיים בדיוק בסוף הרצועה",
|
||||
"trimEndSelection": "הסירו הכל אחרי האזור הנבחר",
|
||||
"trimStartDisabledHint": "כדי לחתוך את ההתחלה, בחרו אזור שמתחיל בדיוק בתחילת הרצועה",
|
||||
"trimStartSelection": "הסירו הכל לפני האזור הנבחר"
|
||||
},
|
||||
"audioEditRestore": {
|
||||
"title": "הפעלות עריכת אודיו שמורות",
|
||||
@@ -807,7 +818,7 @@
|
||||
"acceptAll": "אשר הכל",
|
||||
"revertAll": "החזר הכל",
|
||||
"undoAll": "בטל הכל",
|
||||
"resetAllChanges": "אפס את כל השינויים חזרה למילים המקוריות שתוקנו על ידי AI",
|
||||
"resetAllChanges": "איפוס כל השינויים בחזרה למילים המתוקנות המקוריות",
|
||||
"undo": "בטל",
|
||||
"redo": "בצע שוב",
|
||||
"findReplace": "חפש/החלף",
|
||||
@@ -821,8 +832,8 @@
|
||||
"audioLoadError": "לא הצלחנו לטעון את האודיו",
|
||||
"audioStillLoading": "האודיו עדיין נטען...",
|
||||
"loadingAudio": "טוען אודיו...",
|
||||
"autoCorrect": "הצעות AI",
|
||||
"autoCorrectDesc": "יצירת הצעות תיקון של AI על ידי השוואת התמלול למילות המקור. שום דבר לא ישתנה עד לאישור של כל הצעה."
|
||||
"autoCorrect": "תיקון אוטומטי",
|
||||
"autoCorrectDesc": "הפקת הצעות לתיקון על ידי השוואת התמלול למילות הייחוס. שום שינוי לא יחול עד לאישור כל הצעה."
|
||||
},
|
||||
"guidance": {
|
||||
"showTips": "הצג טיפים",
|
||||
@@ -1294,18 +1305,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 +1324,7 @@
|
||||
"running": "מנתח מילים… פעולה זו אורכת בדרך כלל 15–60 שניות.",
|
||||
"staleHint": "מילים אלו נערכו מאז שההצעות נוצרו, ולכן הצעה זו כבר אינה רלוונטית.",
|
||||
"summary": "{total} הצעות · {pending} ממתינות · {accepted} התקבלו",
|
||||
"title": "הצעות תיקון של AI",
|
||||
"title": "הצעות לתיקון אוטומטי",
|
||||
"undo": "בטל הצעה זו",
|
||||
"cancel": "ביטול",
|
||||
"close": "סגירה",
|
||||
@@ -1321,9 +1332,11 @@
|
||||
"compareHint": "איטי ויקר יותר, אבל מראה על אילו הצעות מספר מודלים מסכימים",
|
||||
"compareLabel": "השוואה בין מספר מודלי AI",
|
||||
"conflictBadge": "גרסה",
|
||||
"conflictTooltip": "המודלים לא מסכימים לגבי המילים האלו — אישור גרסה אחת ידחה את האחרות.",
|
||||
"conflictTooltip": "ישנן הצעות שונות למילים אלו — אישור גרסה אחת ידחה את האחרות.",
|
||||
"consensusBadge": "{consensus}/{total} מודלים",
|
||||
"consensusTooltip": "הוצע על ידי: {models}"
|
||||
"consensusTooltip": "הוצע על ידי: {models}",
|
||||
"cachedBadge": "שמור במטמון",
|
||||
"cachedTooltip": "שוחזר מהרצה קודמת על אותן מילים — ללא חיוב עלות AI."
|
||||
}
|
||||
},
|
||||
"instrumentalReview": {
|
||||
|
||||
+25
-12
@@ -533,7 +533,12 @@
|
||||
"pasteUrlButton": "एक लिंक पेस्ट करो",
|
||||
"urlSupportedSitesHint": "यह YouTube, Facebook, SoundCloud, TikTok, Vimeo और सैकड़ों अन्य साइटों के साथ काम करता है।",
|
||||
"urlSupportedSitesLink": "सभी समर्थित साइटें देखो",
|
||||
"useThisUrl": "इस URL का इस्तेमाल करो"
|
||||
"useThisUrl": "इस URL का इस्तेमाल करो",
|
||||
"matchCorrectedTo": "सही करके {value} कर दिया गया — तुमने “{typed}” टाइप किया था",
|
||||
"matchDidYouMean": "क्या तुम्हारा मतलब यह था?",
|
||||
"matchKeepMine": "जो मैंने टाइप किया है वही रखो",
|
||||
"matchTidiedTo": "ठीक करके {value} कर दिया गया",
|
||||
"matchUndo": "पूर्ववत करो"
|
||||
},
|
||||
"jobStatus": {
|
||||
"settingUp": "सेटअप हो रहा है",
|
||||
@@ -780,7 +785,13 @@
|
||||
"fadeIn": "फ़ेड इन",
|
||||
"fadeInSelection": "चुने गए हिस्से पर फ़ेड इन करो",
|
||||
"fadeOut": "फ़ेड आउट",
|
||||
"fadeOutSelection": "चुने गए हिस्से पर फ़ेड आउट करो"
|
||||
"fadeOutSelection": "चुने गए हिस्से पर फ़ेड आउट करो",
|
||||
"fadeInDisabledHint": "फेड इन करने के लिए, एक ऐसा हिस्सा चुनो जो ट्रैक की बिल्कुल शुरुआत से शुरू होता हो",
|
||||
"fadeOutDisabledHint": "फेड आउट करने के लिए, एक ऐसा हिस्सा चुनो जो ट्रैक के बिल्कुल अंत में खत्म होता हो",
|
||||
"trimEndDisabledHint": "अंत को ट्रिम करने के लिए, एक ऐसा हिस्सा चुनो जो ट्रैक के बिल्कुल अंत में खत्म होता हो",
|
||||
"trimEndSelection": "चुने हुए हिस्से के बाद का सब कुछ हटा दो",
|
||||
"trimStartDisabledHint": "शुरुआत को ट्रिम करने के लिए, एक ऐसा हिस्सा चुनो जो ट्रैक की बिल्कुल शुरुआत से शुरू होता हो",
|
||||
"trimStartSelection": "चुने हुए हिस्से से पहले का सब कुछ हटा दो"
|
||||
},
|
||||
"audioEditRestore": {
|
||||
"title": "सेव किए गए ऑडियो एडिट सेशंस",
|
||||
@@ -807,7 +818,7 @@
|
||||
"acceptAll": "सभी एक्सेप्ट करो",
|
||||
"revertAll": "सभी रिवर्ट करो",
|
||||
"undoAll": "सभी अनडू करो",
|
||||
"resetAllChanges": "सभी बदलावों को ओरिजिनल AI-करेक्टेड लिरिक्स पर रीसेट करो",
|
||||
"resetAllChanges": "सभी बदलावों को वापस मूल सही किए गए लिरिक्स पर रीसेट करो",
|
||||
"undo": "अनडू",
|
||||
"redo": "रीडू",
|
||||
"findReplace": "ढूंढो/बदलो",
|
||||
@@ -821,8 +832,8 @@
|
||||
"audioLoadError": "ऑडियो लोड नहीं हो सका",
|
||||
"audioStillLoading": "ऑडियो अभी भी लोड हो रहा है...",
|
||||
"loadingAudio": "ऑडियो लोड हो रहा है...",
|
||||
"autoCorrect": "AI सुझाव",
|
||||
"autoCorrectDesc": "ट्रांसक्रिप्शन की तुलना रेफरेंस लिरिक्स से करके AI सुधार के सुझाव पाओ। जब तक तुम हर सुझाव को स्वीकार नहीं करते, तब तक कुछ भी नहीं बदलता।"
|
||||
"autoCorrect": "ऑटो-करेक्ट",
|
||||
"autoCorrectDesc": "ट्रांसक्रिप्शन की तुलना रेफरेंस लिरिक्स से करके सुधार के सुझाव जनरेट करो। जब तक तुम हर सुझाव को स्वीकार नहीं करते, तब तक कुछ नहीं बदलता।"
|
||||
},
|
||||
"guidance": {
|
||||
"showTips": "टिप्स दिखाओ",
|
||||
@@ -1294,18 +1305,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 +1324,7 @@
|
||||
"running": "लिरिक्स का विश्लेषण हो रहा है… इसमें आमतौर पर 15–60 सेकंड लगते हैं।",
|
||||
"staleHint": "सुझाव आने के बाद इन शब्दों को एडिट किया गया था, इसलिए यह सुझाव अब लागू नहीं होता।",
|
||||
"summary": "{total} सुझाव · {pending} लंबित · {accepted} स्वीकार किए गए",
|
||||
"title": "AI सुधार सुझाव",
|
||||
"title": "ऑटो-करेक्ट सुझाव",
|
||||
"undo": "इस सुझाव को पूर्ववत करो",
|
||||
"cancel": "कैंसल",
|
||||
"close": "बंद करो",
|
||||
@@ -1321,9 +1332,11 @@
|
||||
"compareHint": "यह धीमा है और इसमें ज़्यादा खर्च आता है, लेकिन यह दिखाता है कि किन सुझावों पर कई मॉडल सहमत हैं",
|
||||
"compareLabel": "कई AI मॉडलों की तुलना करो",
|
||||
"conflictBadge": "विकल्प",
|
||||
"conflictTooltip": "इन शब्दों पर मॉडल असहमत हैं — एक विकल्प को स्वीकार करने से बाकी अस्वीकार हो जाते हैं।",
|
||||
"conflictTooltip": "इन शब्दों के लिए अलग-अलग सुझाव हैं — एक विकल्प को स्वीकार करने पर बाकी अस्वीकार हो जाएंगे।",
|
||||
"consensusBadge": "{consensus}/{total} मॉडल",
|
||||
"consensusTooltip": "इनके द्वारा प्रस्तावित: {models}"
|
||||
"consensusTooltip": "इनके द्वारा प्रस्तावित: {models}",
|
||||
"cachedBadge": "कैश्ड",
|
||||
"cachedTooltip": "इन्हीं लिरिक्स पर पिछले रन से रीस्टोर किया गया — कोई AI लागत नहीं आई।"
|
||||
}
|
||||
},
|
||||
"instrumentalReview": {
|
||||
|
||||
+25
-12
@@ -533,7 +533,12 @@
|
||||
"pasteUrlButton": "Zalijepi poveznicu",
|
||||
"urlSupportedSitesHint": "Radi s platformama YouTube, Facebook, SoundCloud, TikTok, Vimeo i stotinama drugih stranica.",
|
||||
"urlSupportedSitesLink": "Pogledaj sve podržane stranice",
|
||||
"useThisUrl": "Upotrijebi ovaj URL"
|
||||
"useThisUrl": "Upotrijebi ovaj URL",
|
||||
"matchCorrectedTo": "Ispravljeno u {value} — tvoj unos: “{typed}”",
|
||||
"matchDidYouMean": "Jesi li mislio/la?",
|
||||
"matchKeepMine": "zadrži moj unos",
|
||||
"matchTidiedTo": "Uređeno u {value}",
|
||||
"matchUndo": "Poništi"
|
||||
},
|
||||
"jobStatus": {
|
||||
"settingUp": "Postavljanje",
|
||||
@@ -780,7 +785,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 +818,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 +832,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 +1305,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 +1324,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 +1332,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": {
|
||||
|
||||
+25
-12
@@ -533,7 +533,12 @@
|
||||
"pasteUrlButton": "Illessz be egy linket",
|
||||
"urlSupportedSitesHint": "Működik a YouTube, Facebook, SoundCloud, TikTok, Vimeo és több száz más oldallal.",
|
||||
"urlSupportedSitesLink": "Nézd meg az összes támogatott oldalt",
|
||||
"useThisUrl": "Használd ezt az URL-t"
|
||||
"useThisUrl": "Használd ezt az URL-t",
|
||||
"matchCorrectedTo": "Javítva erre: {value} — ezt írtad: „{typed}”",
|
||||
"matchDidYouMean": "Erre gondoltál?",
|
||||
"matchKeepMine": "maradjon, amit írtam",
|
||||
"matchTidiedTo": "Rendezve erre: {value}",
|
||||
"matchUndo": "Visszavonás"
|
||||
},
|
||||
"jobStatus": {
|
||||
"settingUp": "Beállítás",
|
||||
@@ -780,7 +785,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 +818,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 +832,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 +1305,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 +1324,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 +1332,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": {
|
||||
|
||||
+25
-12
@@ -533,7 +533,12 @@
|
||||
"pasteUrlButton": "Tempel tautan",
|
||||
"urlSupportedSitesHint": "Berfungsi dengan YouTube, Facebook, SoundCloud, TikTok, Vimeo, dan ratusan situs lainnya.",
|
||||
"urlSupportedSitesLink": "Lihat semua situs yang didukung",
|
||||
"useThisUrl": "Gunakan URL Ini"
|
||||
"useThisUrl": "Gunakan URL Ini",
|
||||
"matchCorrectedTo": "Dikoreksi menjadi {value} — Anda mengetik “{typed}”",
|
||||
"matchDidYouMean": "Maksud Anda?",
|
||||
"matchKeepMine": "tetap gunakan yang saya ketik",
|
||||
"matchTidiedTo": "Dirapikan menjadi {value}",
|
||||
"matchUndo": "Urungkan"
|
||||
},
|
||||
"jobStatus": {
|
||||
"settingUp": "Menyiapkan",
|
||||
@@ -780,7 +785,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 +818,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 +832,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 +1305,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 +1324,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 +1332,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": {
|
||||
|
||||
+25
-12
@@ -533,7 +533,12 @@
|
||||
"pasteUrlButton": "Incolla un link",
|
||||
"urlSupportedSitesHint": "Funziona con YouTube, Facebook, SoundCloud, TikTok, Vimeo e centinaia di altri siti.",
|
||||
"urlSupportedSitesLink": "Vedi tutti i siti supportati",
|
||||
"useThisUrl": "Usa questo URL"
|
||||
"useThisUrl": "Usa questo URL",
|
||||
"matchCorrectedTo": "Corretto in {value} — hai digitato “{typed}”",
|
||||
"matchDidYouMean": "Intendevi dire?",
|
||||
"matchKeepMine": "mantieni quello che ho digitato",
|
||||
"matchTidiedTo": "Sistemato in {value}",
|
||||
"matchUndo": "Annulla"
|
||||
},
|
||||
"jobStatus": {
|
||||
"settingUp": "Configurazione",
|
||||
@@ -780,7 +785,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 +818,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 +832,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 +1305,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 +1324,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 +1332,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": {
|
||||
|
||||
+25
-12
@@ -533,7 +533,12 @@
|
||||
"pasteUrlButton": "リンクを貼り付ける",
|
||||
"urlSupportedSitesHint": "YouTube、Facebook、SoundCloud、TikTok、Vimeoなど、数百ものサイトに対応しています。",
|
||||
"urlSupportedSitesLink": "対応サイト一覧を見る",
|
||||
"useThisUrl": "このURLを使用する"
|
||||
"useThisUrl": "このURLを使用する",
|
||||
"matchCorrectedTo": "{value} に修正しました — 入力内容: 「{typed}」",
|
||||
"matchDidYouMean": "もしかして?",
|
||||
"matchKeepMine": "入力した内容をそのまま使う",
|
||||
"matchTidiedTo": "{value} に整えました",
|
||||
"matchUndo": "元に戻す"
|
||||
},
|
||||
"jobStatus": {
|
||||
"settingUp": "セットアップ中",
|
||||
@@ -780,7 +785,13 @@
|
||||
"fadeIn": "フェードイン",
|
||||
"fadeInSelection": "選択した範囲をフェードイン",
|
||||
"fadeOut": "フェードアウト",
|
||||
"fadeOutSelection": "選択した範囲をフェードアウト"
|
||||
"fadeOutSelection": "選択した範囲をフェードアウト",
|
||||
"fadeInDisabledHint": "フェードインするには、トラックの先頭から始まる範囲を選択してください",
|
||||
"fadeOutDisabledHint": "フェードアウトするには、トラックの末尾で終わる範囲を選択してください",
|
||||
"trimEndDisabledHint": "末尾をトリミングするには、トラックの末尾で終わる範囲を選択してください",
|
||||
"trimEndSelection": "選択範囲より後の部分をすべて削除します",
|
||||
"trimStartDisabledHint": "先頭をトリミングするには、トラックの先頭から始まる範囲を選択してください",
|
||||
"trimStartSelection": "選択範囲より前の部分をすべて削除します"
|
||||
},
|
||||
"audioEditRestore": {
|
||||
"title": "保存されたオーディオ編集セッション",
|
||||
@@ -807,7 +818,7 @@
|
||||
"acceptAll": "すべて承認",
|
||||
"revertAll": "すべて元に戻す",
|
||||
"undoAll": "すべて取り消す",
|
||||
"resetAllChanges": "すべての変更を元のAI修正済み歌詞にリセット",
|
||||
"resetAllChanges": "すべての変更をリセットして、元の修正済み歌詞に戻す",
|
||||
"undo": "元に戻す",
|
||||
"redo": "やり直し",
|
||||
"findReplace": "検索/置換",
|
||||
@@ -821,8 +832,8 @@
|
||||
"audioLoadError": "音声を読み込めませんでした",
|
||||
"audioStillLoading": "音声はまだ読み込み中です...",
|
||||
"loadingAudio": "音声を読み込み中...",
|
||||
"autoCorrect": "AI提案",
|
||||
"autoCorrectDesc": "文字起こしとリファレンス歌詞を比較して、AIが修正案を生成します。各提案を採用するまで、実際の歌詞が変更されることはありません。"
|
||||
"autoCorrect": "自動補正",
|
||||
"autoCorrectDesc": "文字起こしした歌詞と参照用の歌詞を比較して、修正の提案を生成します。各提案を承認するまで変更は適用されません。"
|
||||
},
|
||||
"guidance": {
|
||||
"showTips": "ヒントを表示",
|
||||
@@ -1294,18 +1305,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 +1324,7 @@
|
||||
"running": "歌詞を分析しています… 通常15〜60秒かかります。",
|
||||
"staleHint": "提案の生成後に歌詞が編集されたため、この提案は無効になりました。",
|
||||
"summary": "{total}件の提案 · 保留中 {pending}件 · 採用済み {accepted}件",
|
||||
"title": "AI修正提案",
|
||||
"title": "自動補正の提案",
|
||||
"undo": "この提案を元に戻す",
|
||||
"cancel": "キャンセル",
|
||||
"close": "閉じる",
|
||||
@@ -1321,9 +1332,11 @@
|
||||
"compareHint": "時間とコストはかかりますが、複数のモデルで一致した提案を確認できます。",
|
||||
"compareLabel": "複数のAIモデルを比較する",
|
||||
"conflictBadge": "別案",
|
||||
"conflictTooltip": "モデル間でこれらの単語の認識が異なります。1つの案を採用すると、他の案は破棄されます。",
|
||||
"conflictTooltip": "これらの単語には複数の修正候補があります。1つの候補を承認すると、他の候補は破棄されます。",
|
||||
"consensusBadge": "{consensus}/{total} モデル",
|
||||
"consensusTooltip": "提案元: {models}"
|
||||
"consensusTooltip": "提案元: {models}",
|
||||
"cachedBadge": "キャッシュ済み",
|
||||
"cachedTooltip": "同じ歌詞の過去のデータから復元されました。AIのコストは発生していません。"
|
||||
}
|
||||
},
|
||||
"instrumentalReview": {
|
||||
|
||||
+25
-12
@@ -533,7 +533,12 @@
|
||||
"pasteUrlButton": "링크 붙여넣기",
|
||||
"urlSupportedSitesHint": "YouTube, Facebook, SoundCloud, TikTok, Vimeo 등 수백 개의 사이트에서 사용할 수 있습니다.",
|
||||
"urlSupportedSitesLink": "지원되는 모든 사이트 보기",
|
||||
"useThisUrl": "이 URL 사용하기"
|
||||
"useThisUrl": "이 URL 사용하기",
|
||||
"matchCorrectedTo": "{value}(으)로 수정되었습니다 — 입력하신 내용: “{typed}”",
|
||||
"matchDidYouMean": "혹시 다음을 찾으셨나요?",
|
||||
"matchKeepMine": "입력한 내용 유지",
|
||||
"matchTidiedTo": "{value}(으)로 정리되었습니다",
|
||||
"matchUndo": "실행 취소"
|
||||
},
|
||||
"jobStatus": {
|
||||
"settingUp": "설정 중",
|
||||
@@ -780,7 +785,13 @@
|
||||
"fadeIn": "페이드 인",
|
||||
"fadeInSelection": "선택한 영역에 페이드 인 적용",
|
||||
"fadeOut": "페이드 아웃",
|
||||
"fadeOutSelection": "선택한 영역에 페이드 아웃 적용"
|
||||
"fadeOutSelection": "선택한 영역에 페이드 아웃 적용",
|
||||
"fadeInDisabledHint": "페이드 인을 적용하려면 트랙의 맨 처음부터 시작하는 영역을 선택하세요.",
|
||||
"fadeOutDisabledHint": "페이드 아웃을 적용하려면 트랙의 맨 끝까지 이어지는 영역을 선택하세요.",
|
||||
"trimEndDisabledHint": "끝부분을 자르려면 트랙의 맨 끝까지 이어지는 영역을 선택하세요.",
|
||||
"trimEndSelection": "선택 영역 이후의 모든 구간 제거",
|
||||
"trimStartDisabledHint": "시작 부분을 자르려면 트랙의 맨 처음부터 시작하는 영역을 선택하세요.",
|
||||
"trimStartSelection": "선택 영역 이전의 모든 구간 제거"
|
||||
},
|
||||
"audioEditRestore": {
|
||||
"title": "저장된 오디오 편집 세션",
|
||||
@@ -807,7 +818,7 @@
|
||||
"acceptAll": "모두 수락",
|
||||
"revertAll": "모두 되돌리기",
|
||||
"undoAll": "모두 실행 취소",
|
||||
"resetAllChanges": "모든 변경 사항을 원래 AI가 수정한 가사로 초기화",
|
||||
"resetAllChanges": "모든 변경 사항을 취소하고 원래 수정된 가사로 되돌립니다",
|
||||
"undo": "실행 취소",
|
||||
"redo": "다시 실행",
|
||||
"findReplace": "찾기/바꾸기",
|
||||
@@ -821,8 +832,8 @@
|
||||
"audioLoadError": "오디오를 불러올 수 없습니다",
|
||||
"audioStillLoading": "아직 오디오를 불러오는 중입니다...",
|
||||
"loadingAudio": "오디오를 불러오는 중입니다...",
|
||||
"autoCorrect": "AI 제안",
|
||||
"autoCorrectDesc": "변환된 가사를 참조 가사와 비교하여 AI 수정 제안을 생성합니다. 각 제안을 수락하기 전까지는 아무것도 변경되지 않습니다."
|
||||
"autoCorrect": "자동 수정",
|
||||
"autoCorrectDesc": "추출된 가사를 참조 가사와 비교하여 수정 제안을 생성합니다. 각 제안을 수락하기 전까지는 아무것도 변경되지 않습니다."
|
||||
},
|
||||
"guidance": {
|
||||
"showTips": "팁 표시",
|
||||
@@ -1294,18 +1305,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 +1324,7 @@
|
||||
"running": "가사 분석 중… 보통 15~60초 정도 걸립니다.",
|
||||
"staleHint": "제안이 생성된 후 해당 단어가 수정되어 이 제안은 더 이상 유효하지 않습니다.",
|
||||
"summary": "{total}개 제안 · {pending}개 대기 중 · {accepted}개 수락됨",
|
||||
"title": "AI 수정 제안",
|
||||
"title": "자동 수정 제안",
|
||||
"undo": "이 제안 실행 취소",
|
||||
"cancel": "취소",
|
||||
"close": "닫기",
|
||||
@@ -1321,9 +1332,11 @@
|
||||
"compareHint": "시간과 비용이 더 들지만, 여러 모델이 공통으로 제안하는 내용을 확인할 수 있어요.",
|
||||
"compareLabel": "여러 AI 모델 비교하기",
|
||||
"conflictBadge": "다른 버전",
|
||||
"conflictTooltip": "이 단어들에 대해 모델마다 제안이 달라요. 하나의 버전을 수락하면 나머지는 반영되지 않아요.",
|
||||
"conflictTooltip": "이 단어들에 대해 여러 제안이 있습니다 — 하나를 수락하면 나머지는 적용되지 않습니다.",
|
||||
"consensusBadge": "{consensus}/{total}개 모델",
|
||||
"consensusTooltip": "제안한 모델: {models}"
|
||||
"consensusTooltip": "제안한 모델: {models}",
|
||||
"cachedBadge": "캐시됨",
|
||||
"cachedTooltip": "동일한 가사로 진행한 이전 작업에서 복원되었습니다 — AI 비용이 발생하지 않았습니다."
|
||||
}
|
||||
},
|
||||
"instrumentalReview": {
|
||||
|
||||
+25
-12
@@ -533,7 +533,12 @@
|
||||
"pasteUrlButton": "Tampal pautan",
|
||||
"urlSupportedSitesHint": "Berfungsi dengan YouTube, Facebook, SoundCloud, TikTok, Vimeo dan beratus-ratus laman web lain.",
|
||||
"urlSupportedSitesLink": "Lihat semua laman web yang disokong",
|
||||
"useThisUrl": "Gunakan URL Ini"
|
||||
"useThisUrl": "Gunakan URL Ini",
|
||||
"matchCorrectedTo": "Dibetulkan kepada {value} — anda menaip “{typed}”",
|
||||
"matchDidYouMean": "Maksud anda?",
|
||||
"matchKeepMine": "kekalkan apa yang saya taip",
|
||||
"matchTidiedTo": "Dikemaskan kepada {value}",
|
||||
"matchUndo": "Buat asal"
|
||||
},
|
||||
"jobStatus": {
|
||||
"settingUp": "Menyediakan",
|
||||
@@ -780,7 +785,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 +818,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 +832,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 +1305,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 +1324,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 +1332,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": {
|
||||
|
||||
+25
-12
@@ -533,7 +533,12 @@
|
||||
"pasteUrlButton": "Lim inn en lenke",
|
||||
"urlSupportedSitesHint": "Fungerer med YouTube, Facebook, SoundCloud, TikTok, Vimeo og hundrevis av andre nettsteder.",
|
||||
"urlSupportedSitesLink": "Se alle støttede nettsteder",
|
||||
"useThisUrl": "Bruk denne URL-en"
|
||||
"useThisUrl": "Bruk denne URL-en",
|
||||
"matchCorrectedTo": "Rettet til {value} – du skrev «{typed}»",
|
||||
"matchDidYouMean": "Mente du?",
|
||||
"matchKeepMine": "behold det jeg skrev",
|
||||
"matchTidiedTo": "Justert til {value}",
|
||||
"matchUndo": "Angre"
|
||||
},
|
||||
"jobStatus": {
|
||||
"settingUp": "Setter opp",
|
||||
@@ -780,7 +785,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 +818,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 +832,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 +1305,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 +1324,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 +1332,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": {
|
||||
|
||||
+25
-12
@@ -533,7 +533,12 @@
|
||||
"pasteUrlButton": "Plak een link",
|
||||
"urlSupportedSitesHint": "Werkt met YouTube, Facebook, SoundCloud, TikTok, Vimeo en honderden andere sites.",
|
||||
"urlSupportedSitesLink": "Bekijk alle ondersteunde sites",
|
||||
"useThisUrl": "Gebruik deze URL"
|
||||
"useThisUrl": "Gebruik deze URL",
|
||||
"matchCorrectedTo": "Gecorrigeerd naar {value} — je typte “{typed}”",
|
||||
"matchDidYouMean": "Bedoelde je?",
|
||||
"matchKeepMine": "behoud wat ik typte",
|
||||
"matchTidiedTo": "Opgeschoond naar {value}",
|
||||
"matchUndo": "Ongedaan maken"
|
||||
},
|
||||
"jobStatus": {
|
||||
"settingUp": "Instellen",
|
||||
@@ -780,7 +785,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 +818,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 +832,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 +1305,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 +1324,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 +1332,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": {
|
||||
|
||||
+25
-12
@@ -533,7 +533,12 @@
|
||||
"pasteUrlButton": "Wklej link",
|
||||
"urlSupportedSitesHint": "Działa z YouTube, Facebookiem, SoundCloud, TikTokiem, Vimeo i setkami innych stron.",
|
||||
"urlSupportedSitesLink": "Zobacz wszystkie obsługiwane strony",
|
||||
"useThisUrl": "Użyj tego adresu URL"
|
||||
"useThisUrl": "Użyj tego adresu URL",
|
||||
"matchCorrectedTo": "Poprawiono na {value} — Twój wpis: „{typed}”",
|
||||
"matchDidYouMean": "Czy chodziło Ci o?",
|
||||
"matchKeepMine": "zachowaj mój wpis",
|
||||
"matchTidiedTo": "Uporządkowano: {value}",
|
||||
"matchUndo": "Cofnij"
|
||||
},
|
||||
"jobStatus": {
|
||||
"settingUp": "Konfigurowanie",
|
||||
@@ -780,7 +785,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 +818,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 +832,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 +1305,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 +1324,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 +1332,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": {
|
||||
|
||||
+25
-12
@@ -533,7 +533,12 @@
|
||||
"pasteUrlButton": "Cole um link",
|
||||
"urlSupportedSitesHint": "Funciona com YouTube, Facebook, SoundCloud, TikTok, Vimeo e centenas de outros sites.",
|
||||
"urlSupportedSitesLink": "Ver todos os sites compatíveis",
|
||||
"useThisUrl": "Usar esta URL"
|
||||
"useThisUrl": "Usar esta URL",
|
||||
"matchCorrectedTo": "Corrigido para {value} — você digitou “{typed}”",
|
||||
"matchDidYouMean": "Você quis dizer?",
|
||||
"matchKeepMine": "manter o que eu digitei",
|
||||
"matchTidiedTo": "Ajustado para {value}",
|
||||
"matchUndo": "Desfazer"
|
||||
},
|
||||
"jobStatus": {
|
||||
"settingUp": "Configurando",
|
||||
@@ -780,7 +785,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 +818,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 +832,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 +1305,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 +1324,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 +1332,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": {
|
||||
|
||||
+25
-12
@@ -533,7 +533,12 @@
|
||||
"pasteUrlButton": "Lipește un link",
|
||||
"urlSupportedSitesHint": "Funcționează cu YouTube, Facebook, SoundCloud, TikTok, Vimeo și sute de alte site-uri.",
|
||||
"urlSupportedSitesLink": "Vezi toate site-urile acceptate",
|
||||
"useThisUrl": "Folosește acest URL"
|
||||
"useThisUrl": "Folosește acest URL",
|
||||
"matchCorrectedTo": "Corectat în {value} — ai scris „{typed}”",
|
||||
"matchDidYouMean": "Ai vrut să spui?",
|
||||
"matchKeepMine": "păstrează ce am scris",
|
||||
"matchTidiedTo": "Ajustat în {value}",
|
||||
"matchUndo": "Anulează"
|
||||
},
|
||||
"jobStatus": {
|
||||
"settingUp": "Se configurează",
|
||||
@@ -780,7 +785,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 +818,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 +832,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 +1305,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 +1324,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 +1332,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": {
|
||||
|
||||
+25
-12
@@ -533,7 +533,12 @@
|
||||
"pasteUrlButton": "Вставить ссылку",
|
||||
"urlSupportedSitesHint": "Работает с YouTube, Facebook, SoundCloud, TikTok, Vimeo и сотнями других сайтов.",
|
||||
"urlSupportedSitesLink": "Посмотреть все поддерживаемые сайты",
|
||||
"useThisUrl": "Использовать эту ссылку"
|
||||
"useThisUrl": "Использовать эту ссылку",
|
||||
"matchCorrectedTo": "Исправлено на {value} — твой текст: «{typed}»",
|
||||
"matchDidYouMean": "Имелось в виду?",
|
||||
"matchKeepMine": "оставить мой вариант",
|
||||
"matchTidiedTo": "Отформатировано как {value}",
|
||||
"matchUndo": "Отменить"
|
||||
},
|
||||
"jobStatus": {
|
||||
"settingUp": "Настройка",
|
||||
@@ -780,7 +785,13 @@
|
||||
"fadeIn": "Плавное нарастание",
|
||||
"fadeInSelection": "Плавное нарастание в выделенной области",
|
||||
"fadeOut": "Плавное затухание",
|
||||
"fadeOutSelection": "Плавное затухание в выделенной области"
|
||||
"fadeOutSelection": "Плавное затухание в выделенной области",
|
||||
"fadeInDisabledHint": "Для плавного нарастания звука выбери область, которая начинается в самом начале трека",
|
||||
"fadeOutDisabledHint": "Для плавного затухания звука выбери область, которая заканчивается в самом конце трека",
|
||||
"trimEndDisabledHint": "Чтобы обрезать конец, выбери область, которая заканчивается в самом конце трека",
|
||||
"trimEndSelection": "Удалить всё после выделения",
|
||||
"trimStartDisabledHint": "Чтобы обрезать начало, выбери область, которая начинается в самом начале трека",
|
||||
"trimStartSelection": "Удалить всё до выделения"
|
||||
},
|
||||
"audioEditRestore": {
|
||||
"title": "Сохраненные сессии редактирования аудио",
|
||||
@@ -807,7 +818,7 @@
|
||||
"acceptAll": "Принять все",
|
||||
"revertAll": "Отменить все",
|
||||
"undoAll": "Отменить все действия",
|
||||
"resetAllChanges": "Сбросить все изменения до оригинального текста, исправленного ИИ",
|
||||
"resetAllChanges": "Сбросить все изменения и вернуть исходный исправленный текст",
|
||||
"undo": "Отменить",
|
||||
"redo": "Повторить",
|
||||
"findReplace": "Найти/Заменить",
|
||||
@@ -821,8 +832,8 @@
|
||||
"audioLoadError": "Не удалось загрузить аудио",
|
||||
"audioStillLoading": "Аудио всё ещё загружается...",
|
||||
"loadingAudio": "Загрузка аудио...",
|
||||
"autoCorrect": "Правки от ИИ",
|
||||
"autoCorrectDesc": "Получи от ИИ предложенные правки на основе сравнения распознанного текста с эталонным. Ничего не изменится, пока ты не примешь каждую из них."
|
||||
"autoCorrect": "Автоисправление",
|
||||
"autoCorrectDesc": "Сгенерируй варианты исправлений, сравнив распознанный текст с эталонным. Ничего не изменится, пока ты не примешь каждый вариант."
|
||||
},
|
||||
"guidance": {
|
||||
"showTips": "Показать советы",
|
||||
@@ -1294,18 +1305,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 +1324,7 @@
|
||||
"running": "Анализ текста… обычно это занимает 15–60 секунд.",
|
||||
"staleHint": "Эти слова были изменены после запуска проверки, поэтому данная правка больше не актуальна.",
|
||||
"summary": "{total} правок · {pending} в ожидании · {accepted} принято",
|
||||
"title": "Исправления от ИИ",
|
||||
"title": "Варианты автоисправления",
|
||||
"undo": "Отменить эту правку",
|
||||
"cancel": "Отмена",
|
||||
"close": "Закрыть",
|
||||
@@ -1321,9 +1332,11 @@
|
||||
"compareHint": "Медленнее и стоит дороже, но показывает, в каких вариантах сходятся несколько моделей",
|
||||
"compareLabel": "Сравнить несколько ИИ-моделей",
|
||||
"conflictBadge": "вариант",
|
||||
"conflictTooltip": "Модели расходятся во мнении насчет этих слов — приняв один вариант, ты отклонишь остальные.",
|
||||
"conflictTooltip": "Для этих слов есть разные варианты — если принять один, остальные будут отклонены.",
|
||||
"consensusBadge": "{consensus}/{total} моделей",
|
||||
"consensusTooltip": "Предложено: {models}"
|
||||
"consensusTooltip": "Предложено: {models}",
|
||||
"cachedBadge": "кэшировано",
|
||||
"cachedTooltip": "Восстановлено из предыдущей обработки этого же текста песни — без затрат на ИИ."
|
||||
}
|
||||
},
|
||||
"instrumentalReview": {
|
||||
|
||||
+25
-12
@@ -533,7 +533,12 @@
|
||||
"pasteUrlButton": "Vlož odkaz",
|
||||
"urlSupportedSitesHint": "Funguje s YouTube, Facebook, SoundCloud, TikTok, Vimeo a stovkami ďalších stránok.",
|
||||
"urlSupportedSitesLink": "Pozri si všetky podporované stránky",
|
||||
"useThisUrl": "Použi túto URL"
|
||||
"useThisUrl": "Použi túto URL",
|
||||
"matchCorrectedTo": "Opravené na {value} — tvoj text: „{typed}“",
|
||||
"matchDidYouMean": "Mal si na mysli?",
|
||||
"matchKeepMine": "ponechať môj text",
|
||||
"matchTidiedTo": "Upravené na {value}",
|
||||
"matchUndo": "Vrátiť späť"
|
||||
},
|
||||
"jobStatus": {
|
||||
"settingUp": "Nastavuje sa",
|
||||
@@ -780,7 +785,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 +818,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 +832,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 +1305,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 +1324,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 +1332,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": {
|
||||
|
||||
+25
-12
@@ -533,7 +533,12 @@
|
||||
"pasteUrlButton": "Klistra in en länk",
|
||||
"urlSupportedSitesHint": "Fungerar med YouTube, Facebook, SoundCloud, TikTok, Vimeo och hundratals andra webbplatser.",
|
||||
"urlSupportedSitesLink": "Se alla webbplatser som stöds",
|
||||
"useThisUrl": "Använd den här URL:en"
|
||||
"useThisUrl": "Använd den här URL:en",
|
||||
"matchCorrectedTo": "Korrigerat till {value} — du skrev ”{typed}”",
|
||||
"matchDidYouMean": "Menade du?",
|
||||
"matchKeepMine": "behåll det jag skrev",
|
||||
"matchTidiedTo": "Justerat till {value}",
|
||||
"matchUndo": "Ångra"
|
||||
},
|
||||
"jobStatus": {
|
||||
"settingUp": "Ställer in",
|
||||
@@ -780,7 +785,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 +818,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 +832,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 +1305,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 +1324,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 +1332,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": {
|
||||
|
||||
+25
-12
@@ -533,7 +533,12 @@
|
||||
"pasteUrlButton": "วางลิงก์",
|
||||
"urlSupportedSitesHint": "รองรับการใช้งานกับ YouTube, Facebook, SoundCloud, TikTok, Vimeo และเว็บไซต์อื่นๆ อีกหลายร้อยแห่ง",
|
||||
"urlSupportedSitesLink": "ดูเว็บไซต์ที่รองรับทั้งหมด",
|
||||
"useThisUrl": "ใช้ URL นี้"
|
||||
"useThisUrl": "ใช้ URL นี้",
|
||||
"matchCorrectedTo": "แก้ไขเป็น {value} — คุณพิมพ์ว่า “{typed}”",
|
||||
"matchDidYouMean": "คุณหมายถึงคำนี้ใช่ไหม?",
|
||||
"matchKeepMine": "ใช้ข้อความที่ฉันพิมพ์",
|
||||
"matchTidiedTo": "จัดรูปแบบเป็น {value}",
|
||||
"matchUndo": "เลิกทำ"
|
||||
},
|
||||
"jobStatus": {
|
||||
"settingUp": "กำลังตั้งค่า",
|
||||
@@ -780,7 +785,13 @@
|
||||
"fadeIn": "เฟดอิน",
|
||||
"fadeInSelection": "เฟดอินในส่วนที่เลือก",
|
||||
"fadeOut": "เฟดเอาต์",
|
||||
"fadeOutSelection": "เฟดเอาต์ในส่วนที่เลือก"
|
||||
"fadeOutSelection": "เฟดเอาต์ในส่วนที่เลือก",
|
||||
"fadeInDisabledHint": "หากต้องการเฟดอิน ให้เลือกช่วงที่เริ่มตั้งแต่จุดแรกสุดของแทร็ก",
|
||||
"fadeOutDisabledHint": "หากต้องการเฟดเอาต์ ให้เลือกช่วงที่สิ้นสุดตรงจุดท้ายสุดของแทร็ก",
|
||||
"trimEndDisabledHint": "หากต้องการตัดส่วนท้ายออก ให้เลือกช่วงที่สิ้นสุดตรงจุดท้ายสุดของแทร็ก",
|
||||
"trimEndSelection": "ลบทุกอย่างที่อยู่หลังส่วนที่เลือก",
|
||||
"trimStartDisabledHint": "หากต้องการตัดส่วนต้นออก ให้เลือกช่วงที่เริ่มตั้งแต่จุดแรกสุดของแทร็ก",
|
||||
"trimStartSelection": "ลบทุกอย่างที่อยู่ก่อนส่วนที่เลือก"
|
||||
},
|
||||
"audioEditRestore": {
|
||||
"title": "เซสชันการแก้ไขเสียงที่บันทึกไว้",
|
||||
@@ -807,7 +818,7 @@
|
||||
"acceptAll": "ยอมรับทั้งหมด",
|
||||
"revertAll": "ย้อนกลับทั้งหมด",
|
||||
"undoAll": "เลิกทำทั้งหมด",
|
||||
"resetAllChanges": "รีเซ็ตการเปลี่ยนแปลงทั้งหมดกลับไปเป็นเนื้อเพลงที่แก้ไขโดย AI ต้นฉบับ",
|
||||
"resetAllChanges": "รีเซ็ตการเปลี่ยนแปลงทั้งหมดกลับไปเป็นเนื้อเพลงที่แก้ไขไว้ตอนแรก",
|
||||
"undo": "เลิกทำ",
|
||||
"redo": "ทำซ้ำ",
|
||||
"findReplace": "ค้นหา/แทนที่",
|
||||
@@ -821,8 +832,8 @@
|
||||
"audioLoadError": "ไม่สามารถโหลดเสียงได้",
|
||||
"audioStillLoading": "ไฟล์เสียงยังโหลดอยู่...",
|
||||
"loadingAudio": "กำลังโหลดไฟล์เสียง...",
|
||||
"autoCorrect": "AI แนะนำ",
|
||||
"autoCorrectDesc": "สร้างคำแนะนำการแก้ไขจาก AI โดยเปรียบเทียบการถอดความกับเนื้อเพลงอ้างอิง จะไม่มีการเปลี่ยนแปลงใดๆ จนกว่าคุณจะยอมรับแต่ละคำแนะนำ"
|
||||
"autoCorrect": "แก้ไขอัตโนมัติ",
|
||||
"autoCorrectDesc": "สร้างคำแนะนำการแก้ไขโดยเปรียบเทียบการถอดเสียงกับเนื้อเพลงอ้างอิง จะไม่มีการเปลี่ยนแปลงใดๆ จนกว่าคุณจะยอมรับแต่ละคำแนะนำ"
|
||||
},
|
||||
"guidance": {
|
||||
"showTips": "แสดงเคล็ดลับ",
|
||||
@@ -1294,18 +1305,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 +1324,7 @@
|
||||
"running": "กำลังวิเคราะห์เนื้อเพลง… โดยปกติจะใช้เวลา 15–60 วินาที",
|
||||
"staleHint": "คำเหล่านี้ถูกแก้ไขหลังจากที่สร้างคำแนะนำแล้ว คำแนะนำนี้จึงไม่สามารถใช้ได้อีกต่อไป",
|
||||
"summary": "{total} คำแนะนำ · รอดำเนินการ {pending} รายการ · ยอมรับแล้ว {accepted} รายการ",
|
||||
"title": "คำแนะนำการแก้ไขจาก AI",
|
||||
"title": "คำแนะนำการแก้ไขอัตโนมัติ",
|
||||
"undo": "เลิกทำคำแนะนำนี้",
|
||||
"cancel": "ยกเลิก",
|
||||
"close": "ปิด",
|
||||
@@ -1321,9 +1332,11 @@
|
||||
"compareHint": "ช้ากว่าและมีค่าใช้จ่ายสูงกว่า แต่จะแสดงคำแนะนำที่โมเดลหลายตัวเห็นตรงกัน",
|
||||
"compareLabel": "เปรียบเทียบโมเดล AI หลายตัว",
|
||||
"conflictBadge": "ตัวเลือก",
|
||||
"conflictTooltip": "โมเดลให้ผลลัพธ์คำเหล่านี้ไม่ตรงกัน — การเลือกตัวเลือกหนึ่งจะเป็นการปฏิเสธตัวเลือกอื่นๆ",
|
||||
"conflictTooltip": "มีคำแนะนำหลายแบบสำหรับคำเหล่านี้ — การเลือกแบบหนึ่งจะเป็นการปฏิเสธแบบอื่นๆ",
|
||||
"consensusBadge": "{consensus}/{total} โมเดล",
|
||||
"consensusTooltip": "เสนอโดย: {models}"
|
||||
"consensusTooltip": "เสนอโดย: {models}",
|
||||
"cachedBadge": "แคชไว้",
|
||||
"cachedTooltip": "กู้คืนจากการประมวลผลเนื้อเพลงเดียวกันในครั้งก่อนหน้า — ไม่มีการคิดค่าใช้จ่าย AI"
|
||||
}
|
||||
},
|
||||
"instrumentalReview": {
|
||||
|
||||
+25
-12
@@ -533,7 +533,12 @@
|
||||
"pasteUrlButton": "Mag-paste ng link",
|
||||
"urlSupportedSitesHint": "Gumagana sa YouTube, Facebook, SoundCloud, TikTok, Vimeo at daan-daang iba pang mga site.",
|
||||
"urlSupportedSitesLink": "Tingnan ang lahat ng suportadong site",
|
||||
"useThisUrl": "Gamitin ang URL na Ito"
|
||||
"useThisUrl": "Gamitin ang URL na Ito",
|
||||
"matchCorrectedTo": "Itinama sa {value} — ang tinype mo ay “{typed}”",
|
||||
"matchDidYouMean": "Ibig mo bang sabihin?",
|
||||
"matchKeepMine": "panatilihin ang tinype ko",
|
||||
"matchTidiedTo": "Inayos sa {value}",
|
||||
"matchUndo": "I-undo"
|
||||
},
|
||||
"jobStatus": {
|
||||
"settingUp": "Sine-set up",
|
||||
@@ -780,7 +785,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 +818,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 +832,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 +1305,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 +1324,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 +1332,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": {
|
||||
|
||||
+25
-12
@@ -533,7 +533,12 @@
|
||||
"pasteUrlButton": "Bir bağlantı yapıştır",
|
||||
"urlSupportedSitesHint": "YouTube, Facebook, SoundCloud, TikTok, Vimeo ve yüzlerce başka siteyle çalışır.",
|
||||
"urlSupportedSitesLink": "Desteklenen tüm siteleri gör",
|
||||
"useThisUrl": "Bu URL'yi Kullan"
|
||||
"useThisUrl": "Bu URL'yi Kullan",
|
||||
"matchCorrectedTo": "{value} olarak düzeltildi — “{typed}” yazmıştın",
|
||||
"matchDidYouMean": "Bunu mu demek istedin?",
|
||||
"matchKeepMine": "yazdığım gibi kalsın",
|
||||
"matchTidiedTo": "{value} olarak düzenlendi",
|
||||
"matchUndo": "Geri al"
|
||||
},
|
||||
"jobStatus": {
|
||||
"settingUp": "Ayarlanıyor",
|
||||
@@ -780,7 +785,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 +818,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 +832,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 +1305,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 +1324,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 +1332,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": {
|
||||
|
||||
+25
-12
@@ -533,7 +533,12 @@
|
||||
"pasteUrlButton": "Вставити посилання",
|
||||
"urlSupportedSitesHint": "Працює з YouTube, Facebook, SoundCloud, TikTok, Vimeo та сотнями інших сайтів.",
|
||||
"urlSupportedSitesLink": "Переглянути всі підтримувані сайти",
|
||||
"useThisUrl": "Використати це посилання"
|
||||
"useThisUrl": "Використати це посилання",
|
||||
"matchCorrectedTo": "Виправлено на {value} — твій варіант: «{typed}»",
|
||||
"matchDidYouMean": "Маєш на увазі?",
|
||||
"matchKeepMine": "залишити мій варіант",
|
||||
"matchTidiedTo": "Відформатовано як {value}",
|
||||
"matchUndo": "Скасувати"
|
||||
},
|
||||
"jobStatus": {
|
||||
"settingUp": "Налаштування",
|
||||
@@ -780,7 +785,13 @@
|
||||
"fadeIn": "Плавне наростання",
|
||||
"fadeInSelection": "Плавне наростання у виділеному фрагменті",
|
||||
"fadeOut": "Плавне згасання",
|
||||
"fadeOutSelection": "Плавне згасання у виділеному фрагменті"
|
||||
"fadeOutSelection": "Плавне згасання у виділеному фрагменті",
|
||||
"fadeInDisabledHint": "Щоб зробити плавне наростання звуку, виділи ділянку, яка починається із самого початку треку",
|
||||
"fadeOutDisabledHint": "Щоб зробити плавне затухання звуку, виділи ділянку, яка закінчується у самому кінці треку",
|
||||
"trimEndDisabledHint": "Щоб обрізати кінець, виділи ділянку, яка закінчується у самому кінці треку",
|
||||
"trimEndSelection": "Видалити все після виділеної ділянки",
|
||||
"trimStartDisabledHint": "Щоб обрізати початок, виділи ділянку, яка починається із самого початку треку",
|
||||
"trimStartSelection": "Видалити все до виділеної ділянки"
|
||||
},
|
||||
"audioEditRestore": {
|
||||
"title": "Збережені сеанси редагування аудіо",
|
||||
@@ -807,7 +818,7 @@
|
||||
"acceptAll": "Прийняти всі",
|
||||
"revertAll": "Повернути всі",
|
||||
"undoAll": "Скасувати всі",
|
||||
"resetAllChanges": "Скинути всі зміни до оригінального тексту, виправленого ШІ",
|
||||
"resetAllChanges": "Скинути всі зміни до початкового виправленого тексту",
|
||||
"undo": "Скасувати",
|
||||
"redo": "Повторити",
|
||||
"findReplace": "Знайти/Замінити",
|
||||
@@ -821,8 +832,8 @@
|
||||
"audioLoadError": "Не вдалося завантажити аудіо",
|
||||
"audioStillLoading": "Аудіо ще завантажується...",
|
||||
"loadingAudio": "Завантаження аудіо...",
|
||||
"autoCorrect": "Пропозиції ШІ",
|
||||
"autoCorrectDesc": "Генеруй пропозиції виправлень від ШІ, порівнюючи транскрипцію з еталонним текстом. Нічого не зміниться, поки ти не приймеш кожну пропозицію."
|
||||
"autoCorrect": "Автовиправлення",
|
||||
"autoCorrectDesc": "Згенеруй пропозиції виправлень, порівнявши транскрипцію з еталонним текстом. Нічого не зміниться, поки ти не приймеш кожну пропозицію."
|
||||
},
|
||||
"guidance": {
|
||||
"showTips": "Показати підказки",
|
||||
@@ -1294,18 +1305,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 +1324,7 @@
|
||||
"running": "Аналізуємо текст… зазвичай це займає 15–60 секунд.",
|
||||
"staleHint": "Ці слова були відредаговані після генерації пропозицій, тому ця пропозиція більше не актуальна.",
|
||||
"summary": "{total} пропозицій · {pending} очікують · {accepted} прийнято",
|
||||
"title": "Пропозиції виправлень від ШІ",
|
||||
"title": "Пропозиції автовиправлення",
|
||||
"undo": "Скасувати цю пропозицію",
|
||||
"cancel": "Скасувати",
|
||||
"close": "Закрити",
|
||||
@@ -1321,9 +1332,11 @@
|
||||
"compareHint": "Повільніше та дорожче, але показує, з якими пропозиціями погоджуються кілька моделей",
|
||||
"compareLabel": "Порівняти кілька моделей ШІ",
|
||||
"conflictBadge": "варіант",
|
||||
"conflictTooltip": "Моделі розійшлися щодо цих слів — обравши один варіант, ти відхилиш інші.",
|
||||
"conflictTooltip": "Для цих слів є різні пропозиції — якщо прийняти один варіант, інші будуть відхилені.",
|
||||
"consensusBadge": "{consensus}/{total} моделей",
|
||||
"consensusTooltip": "Запропоновано: {models}"
|
||||
"consensusTooltip": "Запропоновано: {models}",
|
||||
"cachedBadge": "кешовано",
|
||||
"cachedTooltip": "Відновлено з попереднього запуску для цього ж тексту пісні — без витрат на ШІ."
|
||||
}
|
||||
},
|
||||
"instrumentalReview": {
|
||||
|
||||
+25
-12
@@ -533,7 +533,12 @@
|
||||
"pasteUrlButton": "Dán liên kết",
|
||||
"urlSupportedSitesHint": "Hỗ trợ YouTube, Facebook, SoundCloud, TikTok, Vimeo và hàng trăm trang web khác.",
|
||||
"urlSupportedSitesLink": "Xem tất cả các trang web được hỗ trợ",
|
||||
"useThisUrl": "Sử dụng URL này"
|
||||
"useThisUrl": "Sử dụng URL này",
|
||||
"matchCorrectedTo": "Đã sửa thành {value} — bạn đã nhập “{typed}”",
|
||||
"matchDidYouMean": "Có phải ý bạn là?",
|
||||
"matchKeepMine": "giữ nguyên nội dung tôi đã nhập",
|
||||
"matchTidiedTo": "Đã chỉnh gọn thành {value}",
|
||||
"matchUndo": "Hoàn tác"
|
||||
},
|
||||
"jobStatus": {
|
||||
"settingUp": "Đang thiết lập",
|
||||
@@ -780,7 +785,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 +818,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 +832,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 +1305,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 +1324,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 +1332,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": {
|
||||
|
||||
+25
-12
@@ -533,7 +533,12 @@
|
||||
"pasteUrlButton": "粘贴链接",
|
||||
"urlSupportedSitesHint": "支持 YouTube、Facebook、SoundCloud、TikTok、Vimeo 以及数百个其他网站。",
|
||||
"urlSupportedSitesLink": "查看所有支持的网站",
|
||||
"useThisUrl": "使用此链接"
|
||||
"useThisUrl": "使用此链接",
|
||||
"matchCorrectedTo": "已更正为 {value} — 您输入的是“{typed}”",
|
||||
"matchDidYouMean": "您是不是指?",
|
||||
"matchKeepMine": "保留我的输入",
|
||||
"matchTidiedTo": "已整理为 {value}",
|
||||
"matchUndo": "撤销"
|
||||
},
|
||||
"jobStatus": {
|
||||
"settingUp": "设置中",
|
||||
@@ -780,7 +785,13 @@
|
||||
"fadeIn": "淡入",
|
||||
"fadeInSelection": "在选定区域淡入",
|
||||
"fadeOut": "淡出",
|
||||
"fadeOutSelection": "在选定区域淡出"
|
||||
"fadeOutSelection": "在选定区域淡出",
|
||||
"fadeInDisabledHint": "如需添加淡入效果,请选择从音轨最开头开始的区域",
|
||||
"fadeOutDisabledHint": "如需添加淡出效果,请选择在音轨最末尾结束的区域",
|
||||
"trimEndDisabledHint": "如需裁剪结尾,请选择在音轨最末尾结束的区域",
|
||||
"trimEndSelection": "移除所选区域之后的所有内容",
|
||||
"trimStartDisabledHint": "如需裁剪开头,请选择从音轨最开头开始的区域",
|
||||
"trimStartSelection": "移除所选区域之前的所有内容"
|
||||
},
|
||||
"audioEditRestore": {
|
||||
"title": "已保存的音频编辑会话",
|
||||
@@ -807,7 +818,7 @@
|
||||
"acceptAll": "全部接受",
|
||||
"revertAll": "全部还原",
|
||||
"undoAll": "全部撤销",
|
||||
"resetAllChanges": "将所有更改重置回原始的 AI 校对歌词",
|
||||
"resetAllChanges": "将所有更改重置为最初的纠错歌词",
|
||||
"undo": "撤销",
|
||||
"redo": "重做",
|
||||
"findReplace": "查找/替换",
|
||||
@@ -821,8 +832,8 @@
|
||||
"audioLoadError": "无法加载音频",
|
||||
"audioStillLoading": "音频仍在加载中...",
|
||||
"loadingAudio": "正在加载音频...",
|
||||
"autoCorrect": "AI 建议",
|
||||
"autoCorrectDesc": "通过将转录歌词与参考歌词进行对比来生成 AI 纠错建议。在您接受每条建议之前,不会更改任何内容。"
|
||||
"autoCorrect": "自动纠错",
|
||||
"autoCorrectDesc": "通过将转录内容与参考歌词进行比较来生成纠错建议。在您接受每条建议之前,不会进行任何更改。"
|
||||
},
|
||||
"guidance": {
|
||||
"showTips": "显示提示",
|
||||
@@ -1294,18 +1305,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 +1324,7 @@
|
||||
"running": "正在分析歌词……这通常需要 15–60 秒。",
|
||||
"staleHint": "这些词在生成建议后已被编辑,因此该建议不再适用。",
|
||||
"summary": "{total} 条建议 · {pending} 条待处理 · {accepted} 条已接受",
|
||||
"title": "AI 纠错建议",
|
||||
"title": "自动纠错建议",
|
||||
"undo": "撤销此建议",
|
||||
"cancel": "取消",
|
||||
"close": "关闭",
|
||||
@@ -1321,9 +1332,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})"
|
||||
@@ -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()
|
||||
@@ -29,6 +29,7 @@ Environment variables:
|
||||
import json
|
||||
import logging
|
||||
import os
|
||||
import time
|
||||
from datetime import datetime, timezone, timedelta
|
||||
|
||||
import functions_framework
|
||||
@@ -84,14 +85,37 @@ def get_vm_ip(vm_name, zone=ZONE):
|
||||
return None
|
||||
|
||||
|
||||
def check_active_jobs(vm_ip):
|
||||
try:
|
||||
resp = requests.get(f"http://{vm_ip}:{ENCODING_WORKER_PORT}/health", timeout=5)
|
||||
if resp.status_code == 200:
|
||||
return resp.json().get("active_jobs", 0)
|
||||
except Exception:
|
||||
pass
|
||||
return 0
|
||||
def check_active_jobs(vm_ip, attempts=3):
|
||||
"""Return the worker's active_jobs count, or None if it can't be confirmed.
|
||||
|
||||
Returns None (NOT 0) on any failure — connection error, timeout, non-200,
|
||||
or unparseable body — so the caller can fail SAFE. A busy encoder running a
|
||||
4K render pins all 32 cores and shares uvicorn with the encode subprocess,
|
||||
so /health can miss the 5s window even though the VM is hard at work.
|
||||
Treating that unreachable/slow /health as "0 active jobs" previously let the
|
||||
idle check stop a VM mid-render, orphaning the in-memory job and surfacing
|
||||
as "lost contact with worker ... not found" (incident 2026-06-15).
|
||||
|
||||
A genuinely idle VM answers /health quickly, so the retry loop is cheap and
|
||||
a truly-idle VM is still reclaimed; only ambiguous (busy/unreachable) VMs
|
||||
are kept alive for this cycle.
|
||||
"""
|
||||
last_err = None
|
||||
for attempt in range(attempts):
|
||||
try:
|
||||
resp = requests.get(f"http://{vm_ip}:{ENCODING_WORKER_PORT}/health", timeout=5)
|
||||
if resp.status_code == 200:
|
||||
return int(resp.json().get("active_jobs", 0))
|
||||
last_err = f"HTTP {resp.status_code}"
|
||||
except Exception as e: # noqa: BLE001 - any failure means "unconfirmed"
|
||||
last_err = f"{type(e).__name__}: {e}"
|
||||
if attempt < attempts - 1:
|
||||
time.sleep(2)
|
||||
logger.warning(
|
||||
f"Could not confirm active_jobs for {vm_ip} after {attempts} attempts "
|
||||
f"({last_err}); treating as unknown (assume busy)"
|
||||
)
|
||||
return None
|
||||
|
||||
|
||||
def stop_vm(vm_name, zone=ZONE):
|
||||
@@ -192,16 +216,31 @@ def idle_shutdown(request):
|
||||
results[vm_name] = f"already_{status.lower()}"
|
||||
continue
|
||||
|
||||
# Fail SAFE: never stop a VM unless /health gives us a *confirmed*
|
||||
# active_jobs == 0. If we can't reach the VM or confirm its job count,
|
||||
# keep it alive this cycle (the function reruns every 5 min, so a
|
||||
# genuinely idle VM is reclaimed once /health responds). This prevents
|
||||
# stopping a VM mid-render — the cause of "lost contact with worker"
|
||||
# (incident 2026-06-15).
|
||||
vm_ip = get_vm_ip(vm_name, vm_zone)
|
||||
if vm_ip:
|
||||
active_jobs = check_active_jobs(vm_ip)
|
||||
if active_jobs > 0:
|
||||
results[vm_name] = f"active_jobs={active_jobs}"
|
||||
logger.info(f"{vm_name} has {active_jobs} active jobs, keeping alive")
|
||||
continue
|
||||
if not vm_ip:
|
||||
results[vm_name] = "no_ip_kept_alive"
|
||||
logger.warning(f"{vm_name} is RUNNING but has no reachable IP; keeping alive (fail-safe)")
|
||||
continue
|
||||
|
||||
# Only the currently-routed VM (primary, or active_override fallback)
|
||||
# gets the keep-alive treatment. Other VMs stop on idle.
|
||||
active_jobs = check_active_jobs(vm_ip)
|
||||
if active_jobs is None:
|
||||
results[vm_name] = "health_unknown_kept_alive"
|
||||
logger.warning(f"{vm_name} /health unconfirmed; keeping alive (fail-safe)")
|
||||
continue
|
||||
if active_jobs > 0:
|
||||
results[vm_name] = f"active_jobs={active_jobs}"
|
||||
logger.info(f"{vm_name} has {active_jobs} active jobs, keeping alive")
|
||||
continue
|
||||
|
||||
# active_jobs confirmed 0. Only the currently-routed VM (primary, or
|
||||
# active_override fallback) gets the extra recent-activity keep-alive.
|
||||
# Other VMs stop on idle.
|
||||
if vm_name == active_vm and has_recent_activity:
|
||||
results[vm_name] = "active_session"
|
||||
logger.info(f"{vm_name} (active) kept alive due to recent activity")
|
||||
|
||||
@@ -204,8 +204,13 @@ class TestIdleShutdown:
|
||||
result = json.loads(response)
|
||||
assert result["status"] == "no_config"
|
||||
|
||||
def test_vm_without_ip_still_gets_stopped(self, mock_compute, mock_firestore):
|
||||
"""VMs without an IP (no access config) should still be stopped if idle."""
|
||||
def test_vm_without_ip_kept_alive_failsafe(self, mock_compute, mock_firestore):
|
||||
"""A RUNNING VM with no reachable IP must be KEPT ALIVE, not stopped.
|
||||
|
||||
We can't query /health without an IP, so we can't confirm the VM is
|
||||
idle — stopping it risks killing an in-flight render. Fail safe and
|
||||
leave it for a later cycle once it has an IP (incident 2026-06-15).
|
||||
"""
|
||||
old_activity = (datetime.now(timezone.utc) - timedelta(minutes=30)).isoformat()
|
||||
config = _make_config(last_activity_at=old_activity)
|
||||
_setup_firestore(mock_firestore, config)
|
||||
@@ -218,9 +223,29 @@ class TestIdleShutdown:
|
||||
response, status_code = main.idle_shutdown(MagicMock())
|
||||
|
||||
result = json.loads(response)
|
||||
assert result["results"]["encoding-worker-a"] == "stopped"
|
||||
assert result["results"]["encoding-worker-b"] == "stopped"
|
||||
assert mock_compute.stop.call_count == 2
|
||||
assert result["results"]["encoding-worker-a"] == "no_ip_kept_alive"
|
||||
assert result["results"]["encoding-worker-b"] == "no_ip_kept_alive"
|
||||
mock_compute.stop.assert_not_called()
|
||||
|
||||
def test_health_unconfirmed_keeps_vm_alive(self, mock_compute, mock_firestore):
|
||||
"""If /health can't be confirmed (check_active_jobs returns None), the
|
||||
VM must be KEPT ALIVE, not stopped — a busy encoder's /health can time
|
||||
out under render load, and stopping it orphans the job ("lost contact
|
||||
with worker ... not found", incident 2026-06-15)."""
|
||||
old_activity = (datetime.now(timezone.utc) - timedelta(minutes=30)).isoformat()
|
||||
config = _make_config(last_activity_at=old_activity)
|
||||
_setup_firestore(mock_firestore, config)
|
||||
|
||||
instance = _make_instance(status="RUNNING", ip="1.2.3.4")
|
||||
mock_compute.get.return_value = instance
|
||||
|
||||
with patch("main.check_active_jobs", return_value=None):
|
||||
response, status_code = main.idle_shutdown(MagicMock())
|
||||
|
||||
result = json.loads(response)
|
||||
assert result["results"]["encoding-worker-a"] == "health_unknown_kept_alive"
|
||||
assert result["results"]["encoding-worker-b"] == "health_unknown_kept_alive"
|
||||
mock_compute.stop.assert_not_called()
|
||||
|
||||
def test_no_last_activity_treats_as_idle(self, mock_compute, mock_firestore):
|
||||
"""If last_activity_at is not set, treat as no recent activity."""
|
||||
@@ -440,3 +465,51 @@ class TestParseFallbackVms:
|
||||
("fb-a", "us-central1-a"),
|
||||
("fb-c", "us-central1-c"),
|
||||
]
|
||||
|
||||
|
||||
class TestCheckActiveJobs:
|
||||
"""Direct tests for check_active_jobs — the fail-safe health probe.
|
||||
|
||||
The critical contract: return None (not 0) whenever the count can't be
|
||||
confirmed, so the caller never stops a VM it can't prove is idle
|
||||
(incident 2026-06-15).
|
||||
"""
|
||||
|
||||
def test_returns_count_on_healthy_response(self):
|
||||
resp = MagicMock(status_code=200)
|
||||
resp.json.return_value = {"active_jobs": 4}
|
||||
with patch("main.requests.get", return_value=resp) as get, \
|
||||
patch("main.time.sleep") as sleep:
|
||||
assert main.check_active_jobs("1.2.3.4") == 4
|
||||
# Healthy on first try → no retries, no sleeps
|
||||
assert get.call_count == 1
|
||||
sleep.assert_not_called()
|
||||
|
||||
def test_returns_zero_when_field_missing(self):
|
||||
"""A healthy 200 with no active_jobs field is a confirmed 0, not unknown."""
|
||||
resp = MagicMock(status_code=200)
|
||||
resp.json.return_value = {}
|
||||
with patch("main.requests.get", return_value=resp), patch("main.time.sleep"):
|
||||
assert main.check_active_jobs("1.2.3.4") == 0
|
||||
|
||||
def test_returns_none_on_persistent_exception(self):
|
||||
with patch("main.requests.get", side_effect=OSError("conn refused")) as get, \
|
||||
patch("main.time.sleep") as sleep:
|
||||
assert main.check_active_jobs("1.2.3.4", attempts=3) is None
|
||||
assert get.call_count == 3 # all attempts tried
|
||||
assert sleep.call_count == 2 # slept between, not after the last
|
||||
|
||||
def test_returns_none_on_persistent_non_200(self):
|
||||
resp = MagicMock(status_code=503)
|
||||
with patch("main.requests.get", return_value=resp), patch("main.time.sleep"):
|
||||
assert main.check_active_jobs("1.2.3.4", attempts=2) is None
|
||||
|
||||
def test_recovers_on_retry(self):
|
||||
"""A transient blip followed by a healthy response returns the count."""
|
||||
bad = OSError("timeout")
|
||||
good = MagicMock(status_code=200)
|
||||
good.json.return_value = {"active_jobs": 1}
|
||||
with patch("main.requests.get", side_effect=[bad, good]) as get, \
|
||||
patch("main.time.sleep"):
|
||||
assert main.check_active_jobs("1.2.3.4", attempts=3) == 1
|
||||
assert get.call_count == 2
|
||||
@@ -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,
|
||||
|
||||
Loaded 100 of 113 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user