Skip to content

Commit

Permalink
fix: update output dir default path (#10)
Browse files Browse the repository at this point in the history
* docs: update docs to point at docker hub

* fix bug in default output dir
  • Loading branch information
jveldboom authored May 17, 2023
1 parent c797350 commit 1611df8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,15 @@ Introducing Video Swear Jar, your AI-powered solution for creating clean video c

## Usage
```sh
# build docker container
make docker-build

# create new video file with profanity removed
docker run --rm -it -v $(pwd):/data video-swear-jar \
docker run --rm -it \
-v $(pwd):/data jveldboom/video-swear-jar:v1 \
clean --input video.mkv --model tiny.en --language en

# recommended to mount a ".whisper" directory to locally cache large language models
docker run --rm -it \
-v $(pwd):/data \
-v $(pwd)/.whisper:/app/.whisper jveldboom/video-swear-jar:v1 \
clean --input video.mkv --model tiny.en --language en
```

Expand Down
5 changes: 3 additions & 2 deletions src/clean.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ const argv = yargs.usage('clean')
},
'output-dir': {
description: 'Output directory to save cleaned video',
alias: 'o'
alias: 'o',
default: '.'
}
}).argv

Expand All @@ -34,7 +35,7 @@ const run = async () => {
try {
console.log(chalk.cyan('[1 of 4] Starting video transcribe...'))
const { model, language } = argv
await video.transcribe({ inputFile: paths.inputFile, model, language, outputDir: argv.outputDir })
await video.transcribe({ inputFile: paths.inputFile, model, language, outputDir: argv['output-dir'] })
} catch (err) {
console.error(chalk.red(`Unable to transcribe ${paths.inputFile}`), err)
throw err
Expand Down

0 comments on commit 1611df8

Please sign in to comment.