Skip to content

Instantly share code, notes, and snippets.

View arzga's full-sized avatar

Ari Nykänen arzga

  • Helsinki
View GitHub Profile
@arzga
arzga / App.tsx
Last active June 9, 2022 11:25
Speechly React Apps In Typescript: Example of processing speech segments into app state changes. Upon segment change, the tentative state is calculated with last "stable" state and the information from the segment. Even if the whole utterance changed, the approach would work.
import React, { useCallback, useEffect, useState } from "react";
import {
SpeechSegment,
SpeechProvider,
useSpeechContext,
} from "@speechly/react-client";
import {
BigTranscript,
BigTranscriptContainer,
PushToTalkButton,