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,
@arzga
arzga / link-react-ui.sh
Last active December 14, 2020 18:17
link-react-ui.sh links React project's src/@speechly/react-ui/ to UI components sources in $SPEECHLY_REACT_UI_PATH/components/src
@arzga
arzga / wer.sh
Last active September 13, 2022 15:42
Analyze word error rate (WER) and other sentence metrics between REF and HYP transcripts using 'sclite'.
#!/bin/bash
# Check for requirements:
if ! command -v sclite &> /dev/null; then
echo "Error: 'sclite' not found in path."
echo
echo "You need to install it for transcript substitution/insertion/deletion analysis."
echo "See: https://github.com/usnistgov/SCTK"
exit 1