MCPcopy Create free account
hub / github.com/ACM-VIT/conclave / hashCode

Function hashCode

apps/web/transcript-worker/src/utils.ts:127–134  ·  view source on GitHub ↗
(value: string)

Source from the content-addressed store, hash-verified

125 try {
126 return decodePcm16Base64(base64);
127 } catch {
128 return null;
129 }
130};
131
132export const decodePcm16Base64 = (base64: string): Int16Array => {
133 const binary = atob(base64.replace(/\s+/g, ""));
134 const samples = new Int16Array(Math.floor(binary.length / 2));
135 for (let index = 0; index < samples.length; index += 1) {
136 const value = (binary.charCodeAt(index * 2) & 0xff) | ((binary.charCodeAt(index * 2 + 1) & 0xff) << 8);
137 samples[index] = value >= 0x8000 ? value - 0x10000 : value;

Callers 2

entryFunction · 0.90
normalizeEntriesFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected