skit-ai / stitch

Audio stitcher from pool of labelled recordings

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

stitch

Audio stitcher from pool of labelled recordings. You put WAV recordings with audacity style labels marking lexical symbols along side with same name as audio but txt extension. Then do something like the following:

(setf *resources* (mapcar #'audio-resource-from-label-file
                          (list "./audios/alpha.txt"
                                "./audios/num.txt"
                                "./audios/rubbish.txt")))

;; input is the sequence we want to generate
(let ((input (list "b" "b" "1" "d" "c" "2" "2" "4"))
      (out "out.wav"))
  (uiop:delete-file-if-exists out)
  (stitch-plan (find-plan input *resources*) out))

On command line, you can do the following:

# json maps output filename to the sequence
# {
#   "abc.wav": ["a", "b", "c"],
#   "numbers.wav": ["1", "2", "3"]
# }

# audio-dir contains labels and wav files

./roswell/stitch.ros --input-json ./test.json --audio-dir ./audios/ --output-dir ./generated-audios

TODOs

  • [ ] Planner handling contiguous segments.
  • [ ] Support for positional bias for symbols.
  • [ ] Minor WAV reading optimizations.

About

Audio stitcher from pool of labelled recordings

License:GNU General Public License v3.0


Languages

Language:Common Lisp 100.0%