diff --git a/scripts/analyze.py b/scripts/analyze.py index b21ad8b..1411526 100644 --- a/scripts/analyze.py +++ b/scripts/analyze.py @@ -59,7 +59,7 @@ def transcribe_full(audio_path, lang=None, model_size="small"): vad_filter=True, ) detected_lang = info.language - detected_prob = info.language_probability + detected_prob = float(info.language_probability) print(f" Detekcija: {detected_lang} (p={detected_prob:.2f})", file=sys.stderr) segments = [] @@ -351,7 +351,7 @@ def is_instrumental(transcript, video_duration, threshold=0.1): s["end"] - s["start"] for s in transcript["segments"] ) ratio = vocal_duration / max(video_duration, 1) - return ratio < threshold + return bool(ratio < threshold) def main():