Skip to content

Instantly share code, notes, and snippets.

@Kreijstal
Created June 16, 2020 20:51
Show Gist options
  • Save Kreijstal/2fb6b9aadba92416ee3341ce4d186617 to your computer and use it in GitHub Desktop.
Save Kreijstal/2fb6b9aadba92416ee3341ce4d186617 to your computer and use it in GitHub Desktop.
change audio device tts
//This is to use here https://tts.cyzon.us/files/playground.html
//you have to use https
navigator.mediaDevices.getUserMedia({audio:{deviceId:undefined}}).then(()=>{navigator.mediaDevices.enumerateDevices().then(a=>console.log(a[9]));
var b=document.getElementById("result-audio");
b.setSinkId("communications");
b.play()
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment