Member-only story

7 More JavaScript Web APIs to Build Futuristic Websites you didn’t Know 🤯

Tapajyoti Bose

--

Welcome back to the future! This is the second article on futuristic JavaScript Web APIs, so if you haven’t read the first one, you are recommended to do so here

Here are the 7 more cutting-edge JavaScript Web APIs to add an enchanting touch to your projects to make users part with their money 💰

1. Web Speech

The Web Speech API enables you to incorporate voice data into web apps. The Web Speech API has two parts: SpeechSynthesis (Text-to-Speech), and SpeechRecognition (Asynchronous Speech Recognition)

// Speech Synthesis
const synth = window.speechSynthesis;
const utterance = new SpeechSynthesisUtterance("Hello World");
synth.speak(utterance);

// Speech Recognition
const SpeechRecognition =
window.SpeechRecognition ?? window.webkitSpeechRecognition;
const recognition = new SpeechRecognition();
recognition.start();
recognition.onresult = (event) => {
const speechToText = event.results[0][0].transcript;
console.log(speechToText);
};

NOTES

  1. Even though Speech Synthesis is supported by all major browsers with 96%

--

--

Responses (2)