Copyright | (c) OleksandrZhabenko 2019-2020 |
---|---|
License | MIT |
Maintainer | olexandr543@yahoo.com |
Safe Haskell | None |
Language | Haskell2010 |
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).
Synopsis
- produceSound :: (String, String) -> FilePath -> IO ()
- produceSound2 :: (FilePath, FilePath) -> (String, String) -> String -> IO ()
- produceSound3 :: (String, String) -> (FilePath, FilePath) -> String -> (Int, Double) -> Double -> IO ()
- produceSound4 :: (FilePath, FilePath) -> FilePath -> IO ()
- beginProcessing :: (FilePath, FilePath) -> String -> (String, String) -> IO ()
- tempS :: String -> IO Double
- showCoef :: String -> String
- cleanTemp :: IO ()
Producing sound
produceSound :: (String, String) -> FilePath -> IO () Source #
Function that being given a tuple of String
and a path to the installed by the mmsyn6ukr
package file produces the corresponding analogous sound with your created
voicing. The tuple controls the function behaviour. The first String
in it specifies the actions that will be performed to produce a sound file and the second one
specifies a maximum absolute amplitude starting from which the sound will not be truncated if the alterVadB
and alterVabE
functions must be applied (that is specified
by the first String
parameter).
produceSound2 :: (FilePath, FilePath) -> (String, String) -> String -> IO () Source #
Function produceSound2
is used internally in the produceSound
function.
produceSound3 :: (String, String) -> (FilePath, FilePath) -> String -> (Int, Double) -> Double -> IO () Source #
Function produceSound3
is used internally in the produceSound2
function.
produceSound4 :: (FilePath, FilePath) -> FilePath -> IO () Source #
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 .
beginProcessing :: (FilePath, FilePath) -> String -> (String, String) -> IO () Source #
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
package. The second one is the
name of the resulting file to be produced in the current directory.
Additional functions
tempS :: String -> IO Double Source #
Function to get the Double
value, which shows in how many times you expect that your sound representation will be longer than the one provided by the mmsyn6ukr
package.
showCoef :: String -> String Source #
Function showCoef
is used to represent the duration of the sound file.