mmsyn7ukr-0.1.1.0: A simple basic interface to some SoX functionality or the approximately Ukrainian speech synthesizer with your own recorded voice.

Copyright(c) OleksandrZhabenko 2019
LicenseMIT
Maintainerolexandr543@yahoo.com
Safe HaskellNone
LanguageHaskell2010

SoXBasics

Description

A program and a library that can be used as a simple basic interface to some SoX functionality or for producing the approximately Ukrainian speech with your own recorded voice.

Synopsis

Documentation

maxAbs :: (String, String) -> (String, Bool) Source #

Function maxAbs allows to choose a maximum by absolute value if the values are written as String. Bool True corresponds to maximum value, False - to minimum value

getMaxA :: FilePath -> (Int, Int) -> IO String Source #

Function getMaxA returns a maximum amplitude of the sound in the file in the given lower and upper bounds represented as a tuple of Int values.

getMinA :: FilePath -> (Int, Int) -> IO String Source #

Function getMinA returns a minimum amplitude of the sound in the file in the given lower and upper bounds represented as a tuple of Int values.

selMaxAbs :: FilePath -> (Int, Int) -> IO (String, Bool) Source #

Function selMaxAbs returns a maximum by absolute value amplitude of the sound and allows by its second value in the tuple determine whether it is a maximum or minimum. Bool True corresponds to maximum value, False - to minimum value.

selMA :: FilePath -> (Int, Int) -> Bool -> IO String Source #

Function selMA returns a maximum or a minimum of the sound amplitude of the file depending on the Bool value given. Bool True corresponds to maximum value, False - to minimum value.

extremeS :: FilePath -> (Int, Int) -> Int -> IO (String, Bool) -> IO Int Source #

Function extremeS returns an approximate sample number of the extremum, which will be used further for fade effect.

alterVadB :: FilePath -> Double -> IO () Source #

Function alterVadB removes an approximate silence measured by the absolute value of the sound amplitude from the beginning of the file. The function must be used with the FilePath parameter containing no directories in its name (that mean the file of the FilePath parameter must be in the same directory that also the function is called from).

norm :: FilePath -> IO () Source #

Function norm applies a SoX normalization effect on the audio file. The function must be used with the FilePath parameter containing no directories in its name (that mean the file of the FilePath parameter must be in the same directory that also the function is called from).

normL :: FilePath -> Int -> IO () Source #

Function normL applies a SoX gain effect on the audio file with the maximum absolute dB value given by the Int argument. The function must be used with the FilePath parameter containing no directories in its name (that mean the file of the FilePath parameter must be in the same directory that also the function is called from).

soxStat :: FilePath -> IO () Source #

Function soxStat prints a SoX statistics for the audio file.

alterVadE :: FilePath -> Double -> IO () Source #

Function alterVadE removes an approximate silence measured by the absolute value of the sound amplitude from the end of the file. The function must be used with the FilePath parameter containing no directories in its name (that mean the file of the FilePath parameter must be in the same directory that also the function is called from).

upperBnd :: FilePath -> IO Int Source #

Function upperBnd returns a maximum number of samples for use in other functions.

extremeS1 :: FilePath -> IO Int Source #

Variant of the function extremeS with all the additional information included.

quarterSinFade :: FilePath -> IO () Source #

Function quarterSinFade applies a fade effect by SoX to the audio file with "q" type. The function must be used with the FilePath parameter containing no directories in its name (that mean the file of the FilePath parameter must be in the same directory that also the function is called from).

silenceBoth :: FilePath -> Int -> Int -> IO () Source #

Function silenceBoth adds a silence to both ends of the audio. The function must be used with the FilePath parameter containing no directories in its name (that mean the file of the FilePath parameter must be in the same directory that also the function is called from).

cleanTemp :: IO () Source #

Function cleanTemp removes all the intermediate temporary files in the directory where it is called from.

recA :: FilePath -> Double -> IO () Source #

Function recA records audio file with the given name and duration in seconds

resampleA :: FilePath -> Int -> IO () Source #

Function resampleA changes the sample rate for the recorded audio for further processing. The function must be used with the FilePath parameter containing no directories in its name (that mean the file of the FilePath parameter must be in the same directory that also the function is called from).

durationA :: FilePath -> IO Double Source #

Function durationA returns a duration of the audio file in seconds

playA :: FilePath -> IO () Source #

Function playA plays the given file with SoX

noiseProfB :: FilePath -> IO () Source #

Function noiseProfB creates with SoX a file containing a noise profile for the first 0.05 s of the audio file given

noiseProfE :: FilePath -> IO () Source #

Function noiseProfE creates with SoX a file containing a noise profile for the last 0.05 s of the audio file given.

noiseReduceB :: FilePath -> IO () Source #

Function noiseReduceB reduces with SoX a noise in the file given with the corresponding noise profile created with noiseProfB function. The function must be used with the FilePath parameter containing no directories in its name (that mean the file of the FilePath parameter must be in the same directory that also the function is called from).

noiseReduceE :: FilePath -> IO () Source #

Function noiseReduceE reduces with SoX a noise in the file given with the corresponding noise profile created with noiseProfE function. The function must be used with the FilePath parameter containing no directories in its name (that mean the file of the FilePath parameter must be in the same directory that also the function is called from).

volS :: FilePath -> Double -> IO () Source #

Function volS changes the given audio with the linear ratio for the amplitude so that the resulting amlitude is equal to the given Double parameter. The function must be used with the FilePath parameter containing no directories in its name (that mean the file of the FilePath parameter must be in the same directory that also the function is called from).

volS2 :: FilePath -> FilePath -> IO () Source #

Function volS2 changes the given audio (the first FilePath parameter) with the linear ratio for the amplitude so that the resulting amlitude is equal to the maximum by absolute value amplitude for the file given by the second FilePath parameter. The function must be used with the first FilePath parameter containing no directories in its name (that mean the file of the first FilePath parameter must be in the same directory that also the function is called from).

sincA :: FilePath -> IO () Source #

Function sincA uses a sinc effect with -a 50 -I 0.1k-11k band-pass filter for the audio file given.