Skip to content

Instantly share code, notes, and snippets.

View sheunaluko's full-sized avatar

Sheun Aluko, MD-MS sheunaluko

  • Barnes-Jewish Hospital / Washington University in St. Louis
  • St Louis, Missouri
View GitHub Profile
@sheunaluko
sheunaluko / enable_chatgpt_voice.js
Last active February 22, 2023 02:01
This is code for enabling voice interaction with the ChatGPT Research Preview. In order to use it (in Chrome or Safari which support the Web Speech API), simply paste the following code into the javascript console of the ChatGPT web application, accept "allow microphone", and then start talking!
/* helper function for loading an external script */
function addScript(src) {
return new Promise((resolve, reject) => {
const s = document.createElement('script');
s.setAttribute('src', src);
s.addEventListener('load', resolve);
s.addEventListener('error', reject);
document.body.appendChild(s);
});
}