#!/usr/bin/env bash
# Cut Gustave clips from Clair Obscur voice lines

SOURCE="/tmp/clair-obscur-downloads/gustave.wav"
OUTDIR="$(dirname "$0")/sounds"

mkdir -p "$OUTDIR"

# session.start
ffmpeg -y -i "$SOURCE" -ss 00:00:02.500 -to 00:00:04.500 -c copy "$OUTDIR/expedition-continues-1.wav"
ffmpeg -y -i "$SOURCE" -ss 00:00:04.500 -to 00:00:06.500 -c copy "$OUTDIR/expedition-continues-2.wav"
ffmpeg -y -i "$SOURCE" -ss 00:00:09.000 -to 00:00:10.000 -c copy "$OUTDIR/let-me-help.wav"

# task.complete
ffmpeg -y -i "$SOURCE" -ss 00:08:17.000 -to 00:08:18.400 -c copy "$OUTDIR/tomorrow-comes.wav"

# task.error
ffmpeg -y -i "$SOURCE" -ss 00:01:00.000 -to 00:01:02.000 -c copy "$OUTDIR/this-was-weak.wav"
ffmpeg -y -i "$SOURCE" -ss 00:04:07.500 -to 00:04:11.300 -c copy "$OUTDIR/putain.wav"

# input.required
ffmpeg -y -i "$SOURCE" -ss 00:05:58.200 -to 00:05:59.900 -c copy "$OUTDIR/what-are-we-gonna-do.wav"

echo "Done! Clips saved to $OUTDIR"
ls -la "$OUTDIR"
