You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

aws-chinese-forced-alignment

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

aws-chinese-forced-alignment

Tool for aligning Chinese transcripts with audio using the AWS transcribe service

0.0.6
latest
Source
npmnpm
Version published
Weekly downloads
4
100%
Maintainers
1
Weekly downloads
 
Created
Source

Chinese forced alignment

Tool for aligning Chinese transcripts with audio using the AWS transcribe service.

This project was built for and is used by Dong Chinese.

It can be installed using npm:

npm install aws-chinese-forced-alignment

Usage

const { getIntervals } = require("aws-chinese-forced-alignment");
getIntervals(ARRAY_OF_WORDS, TRANSCRIBE_JSON_OUTPUT);

Example

getIntervals(["你好", "懂", "中文", "很", "酷"], {
    results: {
        items: [{
            "start_time": "1.09",
            "end_time": "1.42",
            "alternatives": [{
                "content": "你好"
            }]
        },
        {
            "start_time": "1.42",
            "end_time": "1.57",
            "alternatives": [{
                "content": "东"
            }]
        },
        {
            "start_time": "1.57",
            "end_time": "1.66",
            "alternatives": [{
                "content": "中文"
            }]
        },
        {
            "start_time": "1.66",
            "end_time": "1.74",
            "alternatives": [{
                "content": "辛苦"
            }]
        }]
    }
});
/// output
[ { xmin: 1.255, xmax: 1.42, text: '你好' },
  { xmin: 1.42, xmax: 1.57, text: '懂' },
  { xmin: 1.57, xmax: 1.66, text: '中文' },
  { xmin: 1.66, xmax: 1.7, text: '很' },
  { xmin: 1.7, xmax: 1.74, text: '酷' } ]

Keywords

chinese

FAQs

Package last updated on 06 Dec 2021

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