Download app/src/cat-sound.mjs from Mike0021/MiniCPM5-2B-WebGPU-Pi-HTTP: direct link, hf CLI and curl.
- Browser
- Download file 473 Bytes
-
https://huggingface.co/spaces/Mike0021/MiniCPM5-2B-WebGPU-Pi-HTTP/resolve/main/app/src/cat-sound.mjs
- Command line
-
hf download hf://spaces/Mike0021/MiniCPM5-2B-WebGPU-Pi-HTTP/app/src/cat-sound.mjs
-
curl -L -o cat-sound.mjs https://huggingface.co/spaces/Mike0021/MiniCPM5-2B-WebGPU-Pi-HTTP/resolve/main/app/src/cat-sound.mjs
473 Bytes
| // Share one preloaded clip so rapid clicks replay it without stacking meows. | |
| const meow = new Audio(new URL('../public/cat-meow-v1.mp3', import.meta.url).href); | |
| meow.preload = 'auto'; | |
| meow.volume = .65; | |
| export function playCatSound() { | |
| // Call directly from the click handler so mobile browsers allow playback. | |
| try { | |
| meow.currentTime = 0; | |
| void meow.play().catch(() => {}); | |
| } catch { /* A failed audio download must not interrupt the cat interaction. */ } | |
| } | |