Skip to content

Instantly share code, notes, and snippets.

@Mosquid
Created March 13, 2021 20:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Mosquid/a3eab50d3018c6ee6042632cb9364ff3 to your computer and use it in GitHub Desktop.
Save Mosquid/a3eab50d3018c6ee6042632cb9364ff3 to your computer and use it in GitHub Desktop.
demorse-user-media.js
const initDecoder = (stream) => {
const decoder = new Demorse({
stream,
render: (str) => {
document.querySelector("#message").innerText = str;
},
});
};
navigator.getUserMedia({ audio: true }, initDecoder, console.error);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment