npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

align-diarized-text

v1.0.9

Published

<!-- _One liner + link to confluence page_ _Screenshot of UI - optional_ -->

Downloads

666

Readme

Brief of the project

Work in progress

A module to align stt transcription with accurate text that has got speaker labels.

For when you already have a transcription, eg in a csv file, with speaker names but no timecodes. And you want to add timecodes but not lose the speaker labels (or the accurate text).

Setup

git clone [email protected]:pietrop/align-diarized-text.git
cd align-diarized-text

See docs notes 'analyses' for more info on getting the media and transcripts, in the right format for this.

Usage

npm install align-diarized-text

see example usage in /src/add-timecodes-to-quotes/

const alignDiraizedText = require('./index.js');

const linesWithSpeaker = require('../../sample-data/input-example.json');
const sttJson = require('../../sample-data/stt-transcript.json')

const res = alignDiraizedText(linesWithSpeaker, sttJson);
// do something with output json 

To troubleshoot the aligement you can also use generateInteractiveTranscript, see example usage in /src/generate-html-to-check-alignement/ to generate an index.html file.

input:

1. Json

An Array list of objects with text and speaker attribtues.

[
  {
    "id": "6af9762b-d0aa-42d2-9d6d-1c114f9219db",
    "text": "Thank you. It's good to be here.",
    "speaker": "Elizabeth Warren"
  },
  {
    "id": "b02da04e-044e-436a-8862-166139568136",
    "text": "So I think of it this way, who is this economy really working for? It's doing great for a thinner and thinner slice at the top. It's doing great for giant drug companies. This is not doing great for people are trying to get a prescription filled. It's doing great for people who want to invest in private prisons just not for the African-Americans and Latinx whose families are torn apart whose lives are destroyed and whose communities are ruined.",
    "speaker": "Elizabeth Warren"
  },
...

The text is human accurate transcription, timecodes are missing, and speaker diraziation info is present.

This could be initially originated from a .tsv or .csv file, and converted to json with 'convert-csv-to-json'.

2. STT

STT array of timecoded words, This is generated from video/audio file of the debate. see sample-data folder more.

Output

View sample-data folder for example output.

Something like this

[
  {
    "start": 144.94,
    "end": 168.31,
    "text": "Thank you. It's good to be here.",
    "words": [
      {
        "end": 145.18,
        "start": 144.94,
        "text": "Thank"
      },
      {
        "start": 145.2,
        "end": 145.66,
        "text": "you."
      },
      ...
    ],
    "id": "6af9762b-d0aa-42d2-9d6d-1c114f9219db",
    "speaker": "Elizabeth Warren"
  },
  ...

System Architecture

TBC

Documentation

There's a docs folder in this repository.

docs/notes contains dev draft notes on various aspects of the project. This would generally be converted either into ADRs or guides when ready.

Development env

Node version is set in node version manager .nvmrc

Build

NA

Tests

NA

Deployment

NA