API start endpoint requires hf_token for Parakeet and Canary diarization even when HF_TOKEN is set
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 77/100
Direzione di ricerca
Inizia dalla convalida intorno alle righe 1115–1121 di internal/api/handlers.go e confrontala con il fallback dell’adattatore aggiunto nel commit ff12270. Segui il modo in cui il gestore di avvio legge HF_TOKEN e memorizza i parametri del job; conferma che la richiesta riesce senza hf_token quando la variabile d’ambiente è impostata, mentre il token non viene restituito nel record del job.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
POST /api/v1/transcription/{id}/start rejects Parakeet and Canary jobs with pyannote diarization unless the request body contains hf_token, even when the HF_TOKEN environment variable is set. As a result, API clients must hold the Hugging Face token, and the token is stored in the job record.
Environment
- Scriberr built from
mainat a353078 withDockerfile.cuda.12.9 - Docker 29.7.2 on x86_64 (Linux), NVIDIA RTX PRO 6000 Blackwell, driver 595.91.07
- Fresh named volumes for
/app/dataand/app/whisperx-env HF_TOKENset in the container environment
Steps to reproduce
- Upload a file with
POST /api/v1/transcription/upload. - Start it without
hf_token.
curl -H "X-API-Key: $KEY" -H "Content-Type: application/json" \
-d '{"model_family":"nvidia_parakeet","model":"parakeet-tdt-0.6b-v3","device":"cuda","diarize":true,"diarize_model":"pyannote","max_speakers":6}' \
http://scriberr:8080/api/v1/transcription/$ID/start
Actual behavior
HTTP 400
{"error":"Hugging Face token (hf_token) is required for Pyannote diarization"}
ff12270 added the HF_TOKEN fallback to the adapters, but the handler still validates the request body on its own (handlers.go#L1115-L1121). When the client passes the token in the body to get past this check, the token is saved with the job parameters and returned by GET /api/v1/transcription/{id} as parameters.hf_token.
Expected behavior
The job starts and the adapter uses HF_TOKEN from the environment, a fallback the adapters have supported since ff12270.
Suggestion
Apply the same fallback in the handler, for example by accepting the request when hf_token is empty and HF_TOKEN is configured.
- Lingua principale
- Go
- Stelle
- 3.1k
- Fork
- 272
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Nessun modello di pull request
- Nessuna guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di rishikanthc/Scriberr
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 73/100
rishikanthc/Scriberr#507 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 80/100
rishikanthc/Scriberr#506 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 73/100
rishikanthc/Scriberr#497 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
rishikanthc/Scriberr#496 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
rishikanthc/Scriberr#456 · 1 commento ·
Tutte le issue di rishikanthc/Scriberr
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
bug os:ios
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
hajimehoshi/ebiten#4039 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 69/100
open-telemetry/opentelemetry-go-compile-instrumentation#1713 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
JakeChampion/lang#14392 ·
I maintainer di solito rispondono entro 1 giorno