Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

aws-transcription-to-vtt

Package Overview
Dependencies
Maintainers
0
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

aws-transcription-to-vtt

convert an AWS transcribe JSON body into a .vtt file

  • 2.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
698
increased by11.5%
Maintainers
0
Weekly downloads
 
Created
Source

aws-transcription-to-vtt

tests

Takes the JSON from Amazon AWS Transcribe and outputs a VTT file.

I couldn't find a module satisfying all of these criteria:

  • has documentation
  • has tests
  • pure es module
  • 0 dependencies
  • is tiny (< 150 lines of code)

so here we are.

inspired by https://github.com/s2texperiments/aws-transcription-to-subtitle

api

const vtt = vttConvert(json)

json is an object returned from Amazon's transcribe service

returns a string consisting of the json converted to vtt format.

full example

import vttConvert from 'aws-transcription-to-vtt'


const json = {
	results: {
        transcripts: [
            {
                transcript: "Wait."
            }
        ],
        items: [
            {
                start_time: "7.84",
                end_time: "12.87",
                alternatives: [
                    {
                        confidence: "0.4523",
                        content: "Wait"
                    }
                ],
                type: "pronunciation"
            },
            {
                alternatives: [
                    {
                        confidence: null,
                        content: "."
                    }
                ],
                type: "punctuation"
            }
        ]
    }
}

const vtt = vttConvert(json)

json is an object returned from Amazon's transcribe service

returns a string consisting of the json converted to vtt format.

testing

npm test

Keywords

FAQs

Package last updated on 29 Sep 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc