diff --git a/iped-engine/src/main/java/iped/engine/config/AudioTranscriptConfig.java b/iped-engine/src/main/java/iped/engine/config/AudioTranscriptConfig.java index 198d73e62b..e950824bb2 100644 --- a/iped-engine/src/main/java/iped/engine/config/AudioTranscriptConfig.java +++ b/iped-engine/src/main/java/iped/engine/config/AudioTranscriptConfig.java @@ -27,7 +27,9 @@ public class AudioTranscriptConfig extends AbstractTaskPropertiesConfig { private static final String MAX_REQUESTS_KEY = "maxConcurrentRequests"; private static final String MIN_WORD_SCORE = "minWordScore"; public static final String HUGGING_FACE_MODEL = "huggingFaceModel"; + public static final String WHISPER_MODEL = "whisperModel"; public static final String WAV2VEC2_SERVICE = "wav2vec2Service"; + public static final String REMOTE_SERVICE = "remoteServiceAddress"; private static final String GOOGLE_MODEL = "googleModel"; private static final String LANG_AUTO_VAL = "auto"; private static final String SKIP_KNOWN_FILES = "skipKnownFiles"; @@ -43,7 +45,8 @@ public class AudioTranscriptConfig extends AbstractTaskPropertiesConfig { private int maxConcurrentRequests; private float minWordScore = 0.7f; private String huggingFaceModel; - private String wav2vec2Service; + private String whisperModel; + private String remoteService; private String googleModel; private boolean skipKnownFiles = true; @@ -109,8 +112,12 @@ public String getHuggingFaceModel() { return huggingFaceModel; } - public String getWav2vec2Service() { - return wav2vec2Service; + public String getWhisperModel() { + return whisperModel; + } + + public String getRemoteService() { + return remoteService; } public String getGoogleModel() { @@ -144,9 +151,16 @@ public void processProperties(UTF8Properties properties) { if (huggingFaceModel != null) { huggingFaceModel = huggingFaceModel.trim(); } - wav2vec2Service = properties.getProperty(WAV2VEC2_SERVICE); - if (wav2vec2Service != null) { - wav2vec2Service = wav2vec2Service.trim(); + whisperModel = properties.getProperty(WHISPER_MODEL); + if (whisperModel != null) { + whisperModel = whisperModel.strip(); + } + remoteService = properties.getProperty(REMOTE_SERVICE); + if (remoteService == null) { + remoteService = properties.getProperty(WAV2VEC2_SERVICE); + } + if (remoteService != null) { + remoteService = remoteService.trim(); } googleModel = properties.getProperty(GOOGLE_MODEL); if (googleModel != null) {