Skip to content

Commit

Permalink
its fucked but it works
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael McCulloch committed Mar 11, 2023
1 parent 2b1e53b commit b5dc408
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
4 changes: 2 additions & 2 deletions app/src/main/java/com/mjm/whisperVoiceRecognition/Vocab.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ public class Vocab {
public int token_beg;
public HashMap<Integer, String> 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
Expand Down

0 comments on commit b5dc408

Please sign in to comment.