Spaces:
Running
on
Zero
Running
on
Zero
Commit
·
01aa014
1
Parent(s):
06074f4
Enable Swagger UI/ReDoc and fix pipeline language parameter error
Browse files- api/routes.py +5 -5
- core/scoring_engine.py +1 -2
api/routes.py
CHANGED
|
@@ -52,12 +52,12 @@ class CustomJSONResponse(Response):
|
|
| 52 |
# =======================================
|
| 53 |
|
| 54 |
app = FastAPI(
|
| 55 |
-
title="Vocal Articulation API",
|
| 56 |
-
description="API for Indonesian vocal articulation assessment",
|
| 57 |
version="2.0.0",
|
| 58 |
-
docs_url=
|
| 59 |
-
redoc_url=
|
| 60 |
-
openapi_url=
|
| 61 |
)
|
| 62 |
|
| 63 |
# CORS middleware
|
|
|
|
| 52 |
# =======================================
|
| 53 |
|
| 54 |
app = FastAPI(
|
| 55 |
+
title="Vocal Articulation API v2.0",
|
| 56 |
+
description="API for Indonesian vocal articulation assessment using Whisper Medium ASR",
|
| 57 |
version="2.0.0",
|
| 58 |
+
docs_url="/docs", # Enable Swagger UI
|
| 59 |
+
redoc_url="/redoc", # Enable ReDoc
|
| 60 |
+
openapi_url="/openapi.json", # Enable OpenAPI JSON
|
| 61 |
)
|
| 62 |
|
| 63 |
# CORS middleware
|
core/scoring_engine.py
CHANGED
|
@@ -121,8 +121,7 @@ class AdvancedVocalScoringSystem:
|
|
| 121 |
model=whisper_model,
|
| 122 |
device=0 if self.device == "cuda" else -1,
|
| 123 |
chunk_length_s=30, # Process long audio in chunks
|
| 124 |
-
return_timestamps=False
|
| 125 |
-
model_kwargs={"language": "id"} # Force Indonesian
|
| 126 |
)
|
| 127 |
|
| 128 |
print(f"✅ Whisper model loaded on {self.device}")
|
|
|
|
| 121 |
model=whisper_model,
|
| 122 |
device=0 if self.device == "cuda" else -1,
|
| 123 |
chunk_length_s=30, # Process long audio in chunks
|
| 124 |
+
return_timestamps=False
|
|
|
|
| 125 |
)
|
| 126 |
|
| 127 |
print(f"✅ Whisper model loaded on {self.device}")
|