diff --git a/app/src/main/java/com/mjm/whisperVoiceRecognition/Transcriber.java b/app/src/main/java/com/mjm/whisperVoiceRecognition/Transcriber.java index f38e425..7ec4682 100644 --- a/app/src/main/java/com/mjm/whisperVoiceRecognition/Transcriber.java +++ b/app/src/main/java/com/mjm/whisperVoiceRecognition/Transcriber.java @@ -74,8 +74,8 @@ String transcribeAudio(float[] byteBuffer) { int startOfTranscript = _dictionary.getStartOfTranscript(); long[][] decoder_ids = new long[1][384]; decoder_ids[0][0] = startOfTranscript; - decoder_ids[0][1] = startOfTranscript + 1; //+ lang; - decoder_ids[0][2] = Vocab.TOKEN_SPEECH_TO_TEXT; + decoder_ids[0][1] = 50259; //+ lang; + decoder_ids[0][2] = Vocab.TRANSCRIBE; decoder_ids[0][3] = noTimestamps; int prefixLen = 4; diff --git a/app/src/main/java/com/mjm/whisperVoiceRecognition/Vocab.java b/app/src/main/java/com/mjm/whisperVoiceRecognition/Vocab.java index c15dd92..b0c0f0c 100644 --- a/app/src/main/java/com/mjm/whisperVoiceRecognition/Vocab.java +++ b/app/src/main/java/com/mjm/whisperVoiceRecognition/Vocab.java @@ -13,8 +13,8 @@ public class Vocab { public int token_beg; public HashMap id_to_token; - public static final int TOKEN_SPEECH_TO_TEXT = 50358; - public static final int TOKEN_UNKNOWN_PURPOSE = 50359; + public static final int TRANSLATE = 50358; + public static final int TRANSCRIBE = 50359; public Vocab() { // Magic Numbers evidently derived from https://github.com/ggerganov/whisper.cpp