-
Notifications
You must be signed in to change notification settings - Fork 63
Open
Description
Hello. I modified the code to recognize the 16kHz .wav file. The code to convert the audio file to the bytes array is as follows:
String filepath = "G:\\Corpus\\North_Wind_and_the_Sun_passage\\M1\\nws_1.wav";
ByteArrayOutputStream out = new ByteArrayOutputStream();
BufferedInputStream in = new BufferedInputStream(new FileInputStream(filePath));
int read;
byte[] buff = new byte[1024];
while ((read = in.read()) > 0) {
out.write(buff, 0, read);
}
out.flush();
byte[] audioBytes = out.toByteArray();
System.out.println("audioBytes:" + audioBytes.length);
return audioBytes;
byte[] inputBuffer = new byte[RECORDING_LENGTH];
System.arraycopy(audioBytes, 0, inputBuffer, 0, audioBytes.length);
However, all outputScores array values are 0, and result is "";
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels