Skip to content

All outputScores array values are 0, and result is "" #9

@FriedaSmith

Description

@FriedaSmith

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 "";

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions