Skip to content

Instantly share code, notes, and snippets.

@BenChung
Created July 22, 2017 18:00
Show Gist options
  • Save BenChung/f34a6c03e60a46728be1529215000bb6 to your computer and use it in GitHub Desktop.
Save BenChung/f34a6c03e60a46728be1529215000bb6 to your computer and use it in GitHub Desktop.
(define (parse-silence-detect str)
(define outp
(regexp-match #px"(silence_start: ([\\d\\.]*))|(silence_end: ([\\d\\.]*) \\| silence_duration: ([\\d\\.]*))" str))
(if outp
(map (lambda str
(let ([strb (list-ref str 0)])
(if strb (string->number strb) #f)))
(list (third outp) (fifth outp) (sixth outp)))
#f))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment