# subtitle-me

> Generate subtitle text from a video

Latest version **1.0.8** (published 2019-11-24) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install subtitle-me
pnpm add subtitle-me
yarn add subtitle-me
bun add subtitle-me
```

Provides the command `subtitle-me`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.8 |
| Published | 2019-11-24 |
| First published | 2019-11-22 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=10 |
| Dependencies | 14 |
| Unpacked size | 25.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Steve Atkin |
| Maintainers | cavatron |
| Keywords | subtitle |

## Links

- npm: https://www.npmjs.com/package/subtitle-me
- Repository: https://github.com/cavatron/subtitle-me
- Homepage: https://github.com/cavatron/subtitle-me#readme
- Issues: https://github.com/cavatron/subtitle-me/issues
- npm.io page: https://npm.io/package/subtitle-me

## Dependencies (14)

- [clui](https://npm.io/package/clui.md) ^0.3.6
- [chalk](https://npm.io/package/chalk.md) ^3.0.0
- [clear](https://npm.io/package/clear.md) ^0.1.0
- [figlet](https://npm.io/package/figlet.md) ^1.2.4
- [lodash](https://npm.io/package/lodash.md) ^4.17.15
- [mkdirp](https://npm.io/package/mkdirp.md) ^0.5.1
- [moment](https://npm.io/package/moment.md) ^2.24.0
- [inquirer](https://npm.io/package/inquirer.md) ^7.0.0
- [minimist](https://npm.io/package/minimist.md) ^1.2.0
- [ibm-watson](https://npm.io/package/ibm-watson.md) ^5.1.0
- [fluent-ffmpeg](https://npm.io/package/fluent-ffmpeg.md) ^2.1.2
- [subtitles-parser](https://npm.io/package/subtitles-parser.md) ^0.0.2
- [sentence-tokenizer](https://npm.io/package/sentence-tokenizer.md) ^1.0.1
- [moment-duration-format](https://npm.io/package/moment-duration-format.md) ^2.3.2

## Recent versions

- 1.0.8 (latest) — 2019-11-24
- 1.0.7 — 2019-11-24
- 1.0.6 — 2019-11-22
- 1.0.5 — 2019-11-22
- 1.0.4 — 2019-11-22
- 1.0.3 — 2019-11-22
- 1.0.2 — 2019-11-22
- 1.0.1 — 2019-11-22
- 1.0.0 — 2019-11-22

## README

# subtitle-me

Subtitle generator for videos using IBM Watson Speech to Text

This is a program written in Node.js used to generate a [SubRip](https://en.wikipedia.org/wiki/SubRip) `.srt` file from an `.mp4` video by using the [IBM Watson Speech to Text](https://www.ibm.com/watson/services/speech-to-text/) service on [IBM Cloud](https://www.ibm.com/cloud/why-ibm/).

>English is currently the only supported language

## Prerequistes

You need to have Node.js installed on your machine. If you don't have Node.js, then you can download it from [nodejs.org](https://nodejs.org). We use the latest Node LTS version, Node 10.

In order to be able to use this program, make sure you have [ffmpeg](http://www.ffmpeg.org) installed on your system (including all necessary encoding libraries such as libmp3lame or libx264).

This project relies on the [fluent-ffmpeg](https://github.com/fluent-ffmpeg/node-fluent-ffmpeg) package, which requires that you have a `ffmpeg` version greater than 0.9. The fluent-ffmpeg package will call `ffmpeg` and `ffprobe` so you need to have these in your `PATH` or set in the `FFMPEG_PATH` environment variable and the `FFPROBE_PATH` environment variable. This program will automatically convert your file to a .mp3 file so you must have the `libmp3lame` codec installed on your system.

You must also create an [IBM Cloud](https://cloud.ibm.com/registration) account and create service instances for [Watson Speech to Text](https://www.ibm.com/cloud/watson-speech-to-text).

## Usage

Set the `IBM_CLOUD_API_KEY` environment variable in your terminal to your Speech to Text API key from IBM Cloud.

Use [npx](https://github.com/npm/npx) to run this program without cloning the repository and installing dependencies. It ships with NPM so no need to install.

### MacOS and Linux

```sh
IBM_CLOUD_API_KEY=your-api-key npx subtitle-me
```

### Windows

```sh
set IBM_CLOUD_API_KEY=your-api-key npx subtitle-me
```

You can indicate whether or not sentence casing should be performed. By default `subtitle-me` will capitalize the first letter in the first word of a subtitle and add a period to the end of the subtitle. 

Once the command has executed, it will create a file named the same as the video filename except with the `.srt` extension. A raw speech events file will also be created and has the same name as the video file except it will append on `_events.json`. Additionally, an .mp3 file will be created that contains the extracted audio from the video file. It will be named the same as the video filename except that it will end in `.mp3`.

---
_Source: https://npm.io/package/subtitle-me · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
