Commit
·
3e0b17d
1
Parent(s):
51a3016
debug
Browse files- handler.py +1 -10
handler.py
CHANGED
|
@@ -216,29 +216,20 @@ class EndpointHandler:
|
|
| 216 |
|
| 217 |
# 1. process input
|
| 218 |
parameters = data.pop("parameters", None)
|
| 219 |
-
logger.info(f"parameters: {parameters}")
|
| 220 |
options = data.pop("options", None)
|
| 221 |
-
logger.info(f"options: {options}")
|
| 222 |
|
| 223 |
# OPTIONS are given as parameters
|
| 224 |
info = options.get("info", False)
|
| 225 |
-
logger.info(f"info: {info}")
|
| 226 |
transcribe = options.get("transcription", False)
|
| 227 |
-
logger.info(f"transcribe: {transcribe}")
|
| 228 |
alignment = options.get("alignment", False)
|
| 229 |
-
logger.info(f"alignment: {alignment}")
|
| 230 |
diarization = options.get("diarization", False)
|
| 231 |
-
logger.info(f"diarization: {diarization}")
|
| 232 |
language = parameters.get("language", "fr")
|
| 233 |
-
logger.info(f"language: {language}")
|
| 234 |
min_speakers = parameters.get("min_speakers", 2)
|
| 235 |
-
logger.info(f"min_speakers: {min_speakers}")
|
| 236 |
max_speakers = parameters.get("max_speakers", 25)
|
| 237 |
-
logger.info(f"max_speakers: {max_speakers}")
|
| 238 |
|
| 239 |
# for diarization without transcription, the transcription is given as input, so data is now a tuple (inputs, transcription)
|
| 240 |
if transcribe:
|
| 241 |
-
|
| 242 |
elif diarization:
|
| 243 |
inputs_encoded, transcription = data.pop("inputs", data)
|
| 244 |
|
|
|
|
| 216 |
|
| 217 |
# 1. process input
|
| 218 |
parameters = data.pop("parameters", None)
|
|
|
|
| 219 |
options = data.pop("options", None)
|
|
|
|
| 220 |
|
| 221 |
# OPTIONS are given as parameters
|
| 222 |
info = options.get("info", False)
|
|
|
|
| 223 |
transcribe = options.get("transcription", False)
|
|
|
|
| 224 |
alignment = options.get("alignment", False)
|
|
|
|
| 225 |
diarization = options.get("diarization", False)
|
|
|
|
| 226 |
language = parameters.get("language", "fr")
|
|
|
|
| 227 |
min_speakers = parameters.get("min_speakers", 2)
|
|
|
|
| 228 |
max_speakers = parameters.get("max_speakers", 25)
|
|
|
|
| 229 |
|
| 230 |
# for diarization without transcription, the transcription is given as input, so data is now a tuple (inputs, transcription)
|
| 231 |
if transcribe:
|
| 232 |
+
inputs_encoded = data.pop("inputs", data)
|
| 233 |
elif diarization:
|
| 234 |
inputs_encoded, transcription = data.pop("inputs", data)
|
| 235 |
|