Asynchronous Logic to Write a Vue 3 and Deepgram Captions Component
In this tutorial, Sandra Rodgers demonstrates how to use Vue 3 composables to power a text-captions component that integrates with Deepgram's speech-to-text API. The post covers using async and await to write a composable that fetches a temporary API key from Deepgram, using Vue 3's watch method to react to data that is updating in real-time as Deepgram sends a text transcription back through a browser WebSocket, and writing logic that is sensitive to the order things occur - i.e., asynchronous logic that flows between the component and the composable. The tutorial assumes some knowledge of Vue 3, in particular Vue composables.
Company
Deepgram
Date published
April 1, 2022
Author(s)
Sandra Rodgers
Word count
2945
Language
English
Hacker News points
None found.