Created
January 8, 2020 19:01
-
-
Save craigeley/88b97ad5b8ed1221e3ed381e726520e7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/local/bin/node | |
var sub = require('subtitle'); | |
var fs = require('fs'); | |
var WaveFile = require('wavefile').WaveFile; | |
// Load a wav file as a WaveFile object | |
let wav = new WaveFile(''); | |
// Read from SRT file to get start, end, and region names | |
fs.readFile('/path/to/file.txt', 'utf8', function(err, data) { | |
if (err) throw err; | |
const words = sub.parse(data); | |
console.log(words); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment