MCPcopy Create free account
hub / github.com/dashscope/dashscope-sdk-java / hasWavHeader

Method hasWavHeader

samples/QwenLiveUsage.java:220–225  ·  view source on GitHub ↗
(Path pcm)

Source from the content-addressed store, hash-verified

218 }
219
220 private static boolean hasWavHeader(Path pcm) throws Exception {
221 byte[] magic = new byte[4];
222 try (InputStream in = Files.newInputStream(pcm)) {
223 return in.read(magic) == 4 && "RIFF".equals(new String(magic, "US-ASCII"));
224 }
225 }
226
227 private static String text(JsonObject event, String field) {
228 JsonElement value = event.get(field);

Callers 1

mainMethod · 0.95

Calls 2

readMethod · 0.45
equalsMethod · 0.45

Tested by

no test coverage detected