diff --git a/iped-engine/src/main/java/iped/engine/task/transcript/WhisperTranscriptTask.java b/iped-engine/src/main/java/iped/engine/task/transcript/WhisperTranscriptTask.java index c6659be0bc..ba5f29e2d7 100644 --- a/iped-engine/src/main/java/iped/engine/task/transcript/WhisperTranscriptTask.java +++ b/iped-engine/src/main/java/iped/engine/task/transcript/WhisperTranscriptTask.java @@ -40,7 +40,12 @@ protected Server startServer0(int device) throws IOException { int cpus = getNumProcessors(); int threads = Runtime.getRuntime().availableProcessors() / cpus; - pb.command(python, script, model, Integer.toString(device), Integer.toString(threads), transcriptConfig.getLanguages().get(0)); + String lang = transcriptConfig.getLanguages().get(0); + if (lang.contains("-")) { + lang = lang.substring(0, lang.indexOf("-")); + } + + pb.command(python, script, model, Integer.toString(device), Integer.toString(threads), lang); Process process = pb.start();