-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | A simple reduced basic interface to some SoX functionality or to produce a voice that can be used by dobutokO2 and other similar packages
--
-- A reduced set of modules and functionality needed to dobutokO2-array
-- package and probably some other ones. Is rewritten from the
-- mmsyn7ukr-0.17.0.0 package to reduce the needed dependencies.
@package mmsyn7ukr-array
@version 0.3.0.0
module Paths_mmsyn7ukr_array
version :: Version
getBinDir :: IO FilePath
getLibDir :: IO FilePath
getDynLibDir :: IO FilePath
getDataDir :: IO FilePath
getLibexecDir :: IO FilePath
getDataFileName :: FilePath -> IO FilePath
getSysconfDir :: IO FilePath
-- | 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 (actually it produces the needed
-- sound representations).
module SoXBasics.Arr
-- | 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
maxAbs :: (String, String) -> (String, Bool)
-- | 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.
getMaxA :: FilePath -> (Int, Int) -> IO String
-- | 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.
getMinA :: FilePath -> (Int, Int) -> IO String
-- | 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.
selMaxAbs :: FilePath -> (Int, Int) -> IO (String, Bool)
-- | 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.
selMA :: FilePath -> (Int, Int) -> Bool -> IO String
-- | Function extremeS returns an approximate sample number of the
-- extremum, which will be used further for fade effect.
extremeS :: FilePath -> (Int, Int) -> Int -> IO (String, Bool) -> IO Int
-- | Variant of the function extremeS with all the additional
-- information included.
extremeS1 :: FilePath -> IO Int
-- | Function soxStat prints a SoX statistics for the audio file.
soxStat :: FilePath -> IO ()
-- | Function upperBnd returns a maximum number of samples for use
-- in other functions.
upperBnd :: FilePath -> IO Int
-- | Function durationA returns a duration of the audio file in
-- seconds.
durationA :: FilePath -> IO Float
-- | Function sampleAn analyzes the one samle of the 1-channel sound
-- file (or k samples for the k-channel file) and returns a tuple pair of
-- the maximum and minimum amplitudes of the sound given as
-- Strings. For the 1-channel sound file they are the same. The
-- Integer parameter is the number of the sample, starting from
-- which SoX analyzes the sound. If it is less than number of the samples
-- available, then the function returns the value for the last one sample
-- for the 1-channel file (or the last k samples for the k-channel sound
-- file). The file must not be in a RAW format for the function to work
-- properly.
sampleAn :: FilePath -> Integer -> IO (String, String)
-- | 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 means the file of the
-- FilePath parameter must be in the same directory where the
-- function is called from). The file must have maximum amplitude
-- absolute value close to 1 before call to the alterVadB. The
-- second Float parameter is used to exit the iteration cycle.
-- The Int parameter from the range [0..3] specifies a maximum
-- amplitude, starting from which the sound will not be trimmed.
alterVadB :: FilePath -> Float -> Int -> Float -> IO ()
-- | 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 means the file of the
-- FilePath parameter must be in the same directory where the
-- function is called from). The second Float parameter is used
-- to exit the iteration cycle. The Int parameter from the range
-- [0..3] specifies a maximum amplitude, starting from which the sound
-- will not be trimmed.
alterVadE :: FilePath -> Float -> Int -> Float -> IO ()
-- | Function alterVadHelp is used internally in the
-- alterVadB and alterVadE functions.
alterVadHelp :: FilePath -> Float -> Float -> Int -> Float -> IO ()
-- | Function opFile is used internally in alterVadB to check
-- whether FilePath exist and if so to do some processing to
-- allow the alterVadB function iterate further.
opFile :: FilePath -> Float -> Int -> IO ()
-- | 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 means the file of the
-- FilePath parameter must be in the same directory where the
-- function is called from).
norm :: FilePath -> IO ()
-- | 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 means the file of the
-- FilePath parameter must be in the same directory where the
-- function is called from).
normL :: FilePath -> Int -> IO ()
-- | Function normL applies a SoX "gain -b [db-Value]" effect on the
-- audio file with dB value given by the Float argument. The
-- function must be used with the FilePath parameter containing
-- no directories in its name (that means the file of the
-- FilePath parameter must be in the same directory where the
-- function is called from).
gainL :: FilePath -> Float -> IO ()
-- | 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 means the file of the FilePath parameter must be in the
-- same directory where the function is called from).
quarterSinFade :: FilePath -> IO ()
-- | Function silenceBoth adds some silence to both ends of the
-- audio. The function must be used with the FilePath parameter
-- containing no directories in its name (that means the file of the
-- FilePath parameter must be in the same directory where the
-- function is called from).
silenceBoth :: FilePath -> Int -> Int -> IO ()
-- | Function recA records audio file with the given name and
-- duration in seconds. For Windows it uses a default audio device and
-- "-t waveaudio -d" option to the SoX.
recA :: FilePath -> Float -> IO ()
-- | Function recB records audio file with the given name and
-- duration in seconds. For Windows it uses a default audio device and
-- "-t waveaudio -d" option to the SoX. Unlike recA, the duration
-- of the pause in seconds (before the SoX executable actually starts to
-- record sound data after an initialization of the sound recording
-- device) is controlled by the second Float function argument.
recB :: FilePath -> (Float, Float) -> IO ()
-- | 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 means the file of the FilePath parameter must be in the
-- same directory where the function is called from).
resampleA :: FilePath -> Int -> IO ()
-- | Function noiseProfB creates with SoX a file containing a noise
-- profile for the first 0.05 s of the audio file given.
noiseProfB :: FilePath -> IO ()
-- | Function noiseProfE creates with SoX a file containing a noise
-- profile for the last 0.05 s of the audio file given.
noiseProfE :: FilePath -> IO ()
-- | 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 means the file of the FilePath parameter must be in the
-- same directory where the function is called from).
noiseReduceB :: FilePath -> IO ()
-- | 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 means the file of the FilePath parameter must be in the
-- same directory where the function is called from).
noiseReduceE :: FilePath -> IO ()
-- | Function noiseReduceBU reduces with SoX a noise in the file
-- given with the corresponding noise profile created with
-- noiseProfBU function. The function must be used with the
-- FilePath parameter containing no directories in its name
-- (that means the file of the FilePath parameter must be in the
-- same directory where the function is called from). The Float
-- parameter is a number between 0 and 1 showing the level of reducing
-- the noise (the greater number means that the function will reduce more
-- intensively may be even aggressively so that for greater numbers it
-- can remove some sensitive and important sound data as a noise).
-- Internally this parameter is passed unchanged to the "sox" so that it
-- uses it as an amount parameter for the "noisered" effect. Therefore,
-- please, (as being stated in the SoX manual) experiment with the amount
-- to get suitable results.
noiseReduceBU :: FilePath -> Float -> IO ()
-- | Function noiseReduceEU reduces with SoX a noise in the file
-- given with the corresponding noise profile created with
-- noiseProfEU function. The function must be used with the
-- FilePath parameter containing no directories in its name
-- (that means the file of the FilePath parameter must be in the
-- same directory where the function is called from). The Float
-- parameter is a number between 0 and 1 showing the level of reducing
-- the noise (the greater number means that the function will reduce more
-- intensively may be even aggressively so that for greater numbers it
-- can remove some sensitive and important sound data as a noise).
-- Internally this parameter is passed unchanged to the "sox" so that it
-- uses it as an amount parameter for the "noisered" effect. Therefore,
-- please, (as being stated in the SoX manual) experiment with the amount
-- to get suitable results.
noiseReduceEU :: FilePath -> Float -> IO ()
-- | Function sincA uses a "sinc" effect with -a 50 -I
-- 0.07k-11k band-pass filter for the audio file given.
sincA :: FilePath -> IO ()
-- | Function volS changes the given audio with the linear ratio for
-- the amplitude so that the resulting amlitude is equal to the given
-- Float parameter. The function must be used with the
-- FilePath parameter containing no directories in its name
-- (that means the file of the FilePath parameter must be in the
-- same directory where the function is called from).
volS :: FilePath -> Float -> IO ()
-- | Function volS2 changes the given audio (the first
-- FilePath parameter, which must be normalized e. g. by the
-- norm function before) 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 means the file
-- of the first FilePath parameter must be in the same directory
-- where the function is called from).
volS2 :: FilePath -> FilePath -> IO ()
-- | Function playA plays the given file with SoX. For Windows it
-- uses "-t waveaudio -d" options for SoX.
playA :: FilePath -> IO ()
-- | 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 (actually it produces the needed
-- sound representations).
module Processing_mmsyn7ukr_array
-- | Function produceSound2 is used internally in the
-- produceSound function.
produceSound2 :: (FilePath, FilePath) -> (String, String) -> String -> IO ()
-- | Function produceSound3 is used internally in the
-- produceSound2 function.
produceSound3 :: (String, String) -> (FilePath, FilePath) -> String -> (Int, Float) -> Float -> IO ()
-- | Function produceSound4 is used internally in the
-- produceSound3 function for amplification up/down to the maximum
-- level of the first FilePath parameter in the tuple. The
-- second one gives a name of the resulting file and the third
-- FilePath parameter of the function is the FilePath
-- for the input file.
produceSound4 :: (FilePath, FilePath) -> FilePath -> IO ()
-- | Function beginProcessing is used to catch the variant where the
-- sound is fully cut by the SoX because the sound was created in
-- inappropriate time. It returns the process to the beginning of the
-- sound recording. For the meaning of the tuple of Sring
-- parameters, refer to produceSound documentation. The first
-- FilePath in the tuple of FilePath parameters is a
-- name of the sound file in mmsyn6ukr-array package. The second
-- one is the name of the resulting file to be produced in the current
-- directory.
beginProcessing :: (FilePath, FilePath) -> String -> (String, String) -> IO ()
-- | Function controlNoiseReduction is used in the
-- produceSound2 and beginProcessing functions to reduce
-- the noise with the created by the tempeRa noise profile. If you
-- specified something else than "-1" as a first command line argument,
-- then the program will reduce the noise using the created noise
-- profile. If the first character is one of the following, then the
-- program will do the following actions besides. After the first
-- character (without any spaces) you can specify the level of noise
-- reduction by 2 next digits. They are treated by the program as a
-- fractional part of the number "0." ++ "..." so that the last number is
-- passed to the SoX as an amount parameter in the "noisered" effect (the
-- greater number gives more aggressive noise reduction with the default
-- one equal to 0.5. For more information, please, refer to the SoX
-- documentation.
controlNoiseReduction :: String -> IO ()
-- | Function to get the (Float, Float, Bool) value. The first
-- Float value shows in how many times you expect that your
-- sound representation will be longer than the one provided by the
-- mmsyn6ukr-array package. The second one specifies a duration
-- of the pause before SoX actually starts to record the needed sound
-- data (in seconds). The Bool value specifies whether the
-- program uses a 'sharp' mode meaning that it does not check whether the
-- resulting duration of the recording is at least 3 seconds long, so you
-- can specify shorter durations. The String arguments are the
-- Ukrainian sound representation name and the second command line
-- argument for the program respectively.
tempS :: String -> String -> IO (Float, Float, Bool)
-- | Function showCoef is used to represent the duration of the
-- sound file.
showCoef :: String -> String
-- | Function tempeRa is used to create a noise profile for all the
-- recorded sounds. The function is used internally in the
-- mmsyn7ukr program. While running if you provide a 5 seconds
-- silence as needed, the program mmsyn7ukr will reduce the
-- noise in your recordings. This will create a cleaner sound. If you
-- would like not to reduce the noise at all, then, please, specify "-1"
-- as the first command line argument for the program mmsyn7ukr.
tempeRa :: Int -> IO ()
-- | Function recommendSharp is used to print an advice about the
-- speech transformation for the Ukrainian sounds that you can pronounce
-- properly continually and so it can be better to use for their
-- producing a 'sharp' mode.
recommendSharp :: String -> IO ()
-- | Function cleanTemp removes all the intermediate temporary files
-- in the directory where it is called from.
cleanTemp :: IO ()
-- | Function cleanTempN removes all the intermediate temporary
-- files produced during a noise profile creation in the directory where
-- it is called from.
cleanTempN :: IO ()
-- | 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 (actually it produces the needed
-- sound representations). This module differs from a SoXBasics that the
-- resulting files in it have possibly just the same name as the input
-- ones. The functions try to replace the initial file with the processed
-- one.
module SoXBasics1.Arr
-- | 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 means the file of the
-- FilePath parameter must be in the same directory where the
-- function is called from). While being executed the function tries to
-- replace the initial file with the resulting processed one and to clean
-- the temporary files. If it is not successful the function exits with
-- exception of the type FinalException and leaves the initial
-- file without modification.
norm :: FilePath -> IO ()
-- | 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 means the file of the
-- FilePath parameter must be in the same directory where the
-- function is called from). While being executed the function tries to
-- replace the initial file with the resulting processed one and to clean
-- the temporary files. If it is not successful the function exits with
-- exception of the type FinalException and leaves the initial
-- file without modification.
normL :: FilePath -> Int -> IO ()
-- | Function normL applies a SoX "gain -b [db-Value]" effect on the
-- audio file with dB value given by the Float argument. The
-- function must be used with the FilePath parameter containing
-- no directories in its name (that means the file of the
-- FilePath parameter must be in the same directory where the
-- function is called from). While being executed the function tries to
-- replace the initial file with the resulting processed one and to clean
-- the temporary files. If it is not successful the function exits with
-- exception of the type FinalException and leaves the initial
-- file without modification.
gainL :: FilePath -> Float -> IO ()
-- | 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 means the file of the FilePath parameter must be in the
-- same directory where the function is called from). While being
-- executed the function tries to replace the initial file with the
-- resulting processed one and to clean the temporary files. If it is not
-- successful the function exits with exception of the type
-- FinalException and leaves the initial file without
-- modification.
quarterSinFade :: FilePath -> IO ()
-- | Function silenceBoth adds some silence to both ends of the
-- audio. The function must be used with the FilePath parameter
-- containing no directories in its name (that means the file of the
-- FilePath parameter must be in the same directory where the
-- function is called from). While being executed the function tries to
-- replace the initial file with the resulting processed one and to clean
-- the temporary files. If it is not successful the function exits with
-- exception of the type FinalException and leaves the initial
-- file without modification.
silenceBoth :: FilePath -> Int -> Int -> IO ()
-- | 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 means the file of the FilePath parameter must be in the
-- same directory where the function is called from). While being
-- executed the function tries to replace the initial file with the
-- resulting processed one and to clean the temporary files. If it is not
-- successful the function exits with exception of the type
-- FinalException and leaves the initial file without
-- modification.
resampleA :: FilePath -> Int -> IO ()
-- | 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 means the file of the FilePath parameter must be in the
-- same directory where the function is called from). While being
-- executed the function tries to replace the initial file with the
-- resulting processed one and to clean the temporary files. If it is not
-- successful the function exits with exception of the type
-- FinalException and leaves the initial file without
-- modification.
noiseReduceB :: FilePath -> IO ()
-- | 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 means the file of the FilePath parameter must be in the
-- same directory where the function is called from). While being
-- executed the function tries to replace the initial file with the
-- resulting processed one and to clean the temporary files. If it is not
-- successful the function exits with exception of the type
-- FinalException and leaves the initial file without
-- modification.
noiseReduceE :: FilePath -> IO ()
-- | Function noiseReduceBU reduces with SoX a noise in the file
-- given with the corresponding noise profile created with
-- noiseProfBU function. The function must be used with the
-- FilePath parameter containing no directories in its name
-- (that means the file of the FilePath parameter must be in the
-- same directory where the function is called from). The Float
-- parameter is a number between 0 and 1 showing the level of reducing
-- the noise (the greater number means that the function will reduce more
-- intensively may be even aggressively so that for greater numbers it
-- can remove some sensitive and important sound data as a noise).
-- Internally this parameter is passed unchanged to the "sox" so that it
-- uses it as an amount parameter for the "noisered" effect. Therefore,
-- please, (as being stated in the SoX manual) experiment with the amount
-- to get suitable results. While being executed the function tries to
-- replace the initial file with the resulting processed one and to clean
-- the temporary files. If it is not successful the function exits with
-- exception of the type FinalException and leaves the initial
-- file without modification.
noiseReduceBU :: FilePath -> Float -> IO ()
-- | Function noiseReduceEU 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 means the file of the FilePath parameter must be in the
-- same directory where the function is called from). The Float
-- parameter is a number between 0 and 1 showing the level of reducing
-- the noise (the greater number means that the function will reduce more
-- intensively may be even aggressively so that for greater numbers it
-- can remove some sensitive and important sound data as a noise).
-- Internally this parameter is passed unchanged to the "sox" so that it
-- uses it as an amount parameter for the "noisered" effect. Therefore,
-- please, (as being stated in the SoX manual) experiment with the amount
-- to get suitable results. While being executed the function tries to
-- replace the initial file with the resulting processed one and to clean
-- the temporary files. If it is not successful the function exits with
-- exception of the type FinalException and leaves the initial
-- file without modification.
noiseReduceEU :: FilePath -> Float -> IO ()
-- | Function sincA uses a "sinc" effect with -a 50 -I
-- 0.07k-11k band-pass filter for the audio file given. While being
-- executed the function tries to replace the initial file with the
-- resulting processed one and to clean the temporary files. If it is not
-- successful the function exits with exception of the type
-- FinalException and leaves the initial file without
-- modification.
sincA :: FilePath -> IO ()
-- | Function volS changes the given audio with the linear ratio for
-- the amplitude so that the resulting amlitude is equal to the given
-- Float parameter. The function must be used with the
-- FilePath parameter containing no directories in its name
-- (that means the file of the FilePath parameter must be in the
-- same directory where the function is called from). While being
-- executed the function tries to replace the initial file with the
-- resulting processed one and to clean the temporary files. If it is not
-- successful the function exits with exception of the type
-- FinalException and leaves the initial file without
-- modification.
volS :: FilePath -> Float -> IO ()
-- | Function volS2 changes the given audio (the first
-- FilePath parameter, which must be normalized e. g. by the
-- norm function before) 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 means the file
-- of the first FilePath parameter must be in the same directory
-- where the function is called from). While being executed the function
-- tries to replace the initial file with the resulting processed one and
-- to clean the temporary files. If it is not successful the function
-- exits with exception of the type FinalException and leaves the
-- initial file without modification.
volS2 :: FilePath -> FilePath -> IO ()