zalbia / silence

Divide an audio stream by silence. Mostly written in pure FP using ZIO.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Assignment - Silence

Divide an audio stream by silence. Mostly written in pure FP using ZIO.

Getting Started

Clone and run SBT on the project root directory. Make sure to have the prerequisites below installed on your machine.

Prerequisites

  • JDK 8
  • SBT
  • Scala 2.13.4

This assignment was developed on WSL 1.0 on Windows 10, version 2004. It should run on OSes supporting the JVM as I don't think there's anything OS-specific in here, but I haven't tried it myself.

Running the Program in SBT

The program reads audio silence data from XML and ISO-8601 duration strings from user input and prints an audio file segment descriptor in JSON to standard output.

The command line arguments are in the following format:

<path-to-xml> <chapter-silence-duration> <partition-threshold-duration> <part-silence-duration>

where duration is an ISO 8601 duration string.

Here are some example arguments that I've found to yield a fairly good representation of the output.

sbt> run silence1.xml PT3S PT30M PT1S

Tests

Tests are written using zio-test. The pieces of functionality with tests are for command line argument parsing, and the business logic of dividing an audio stream into chapters by silence.

To run the tests, simply run test in SBT.

sbt> test

Built With

Author

License

This project is licensed under the MIT License - see the LICENSE.md file for details

About

Divide an audio stream by silence. Mostly written in pure FP using ZIO.

License:Other


Languages

Language:Scala 100.0%