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

amazon-translate-subtitles

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

amazon-translate-subtitles

Library for translating subtitles using Amazon Translate

  • 1.1.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

amazon-translate-subtitles

npm package Build Status Downloads Issues Code Coverage Commitizen Friendly Semantic Release

Translate subtitles embedded in video files using Amazon Translate

Currently supports mkv input and srt output.

Install

npm install amazon-translate-subtitles

Usage

import { translateSubtitles } from 'amazon-translate-subtitles';

const video = createReadStream('my-video.mkv');

const thaiSubs = await translateSubtitles({ video, targetLanguage: 'th' });
console.log(thaiSubs);
/*
"
1
00:00:03,549 --> 00:00:05,290
... ยักษ์ใหญ่แห่งโรดส์!

2
00:00:05,757 --> 00:00:06,678
ไม่!
"
*/

API

translateSubtitles(options)

options

Type: object

awsClientOverrides

Type: object

Default: {}

Configuration options passed to the AWS SDK Translate client as overrides.

showProgress

Type: boolean

Default: false

Turns the progress bar on or off.

sourceLanguage

Type: string

Default: 'en'

Source language for translating the subtitles from.

sourceTrackType

Type: string

Default: 'auto'

Source track type to select if multiple subtitle tracks of the same language are available. Options are auto, sdh, and forced.

Auto: The library will attempt to grab the standard subtitles.

SDH: Subtitles designed for those who are deaf and hard of hearing.

Forced: Displayed when the video has a secondary language being spoken.

targetLanguage

Type: string

Target language for translating the subtitles to.

video

Type: ReadStream

Read Stream of the video file you would like to translate subtitles for.

Keywords

FAQs

Package last updated on 09 Jul 2023

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