Alexzava / js-beater

Interact with audio file or microphone from your browser

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

JS-Beater

Interact with audio file or microphone from your browser.

Try the demo here

How to use

Play from microphone

<script src="jsbeater.js"></script>
<script>
	window.onload = () => {
		let threshold = 180 // Default 180
		jsbMic(example, t)
	}

	function example() {
		console.log("Hello World!")
	}
</script>

Play from file

<script src="jsbeater.js"></script>
<script>
	window.onload = () => {
		let threshold = 240 // Default 240
		jsbFile("filename.mp3", example, t)
	}

	function example() {
		console.log("Hello World!")
	}
</script>

Examples

Play from microphone

Play from file

License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.

About

Interact with audio file or microphone from your browser

License:Apache License 2.0


Languages

Language:JavaScript 100.0%