mmsyn7ukr-0.17.0.0: A simple basic interface to some SoX functionality or to produce a voice that can be used by mmsyn7h

Copyright(c) OleksandrZhabenko 2019-2020
LicenseMIT
StabilityExperimental
Safe HaskellNone
LanguageHaskell2010

Processing_mmsyn7ukr

Contents

Description

Maintainer : olexandr543@yahoo.com

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

Main7ukr function

main7ukr :: [String] -> IO () Source #

Function main7ukr is used internally in the main function of the Main module. It responds for mainstream mmsyn7ukr program execution. It starts with CAUTION to be responsible for usage and to use it personally in some important cases (see README) and with some additional information. Then the program guides you through the creating your Ukrainian "voice". Please, use it carefully. The function uses command line arguments. For their meaning, please, refer to README file.

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 alterVadE 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, Float) -> Float -> 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.

controlNoiseReduction :: String -> IO () Source #

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.

Additional functions

tempS :: String -> String -> IO (Float, Float, Bool) Source #

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 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.

showCoef :: String -> String Source #

Function showCoef is used to represent the duration of the sound file.

tempeRa :: Int -> IO () Source #

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.

Informational messages printing functions

printGenInfo0 :: IO () Source #

Function printGenInfo0 prints once the general information if in the second command line argument there is no letter 's' at the end.

printGenInfo1 :: IO () Source #

Function printGenInfo1 prints the general information about behaviour of the program in case of the different specified first two command line arguments. If in the second command line argument there is letter 's' at the end, then the printing is omitted.

printGenInfo2 :: IO () Source #

Function printGenInfo2 prints the additional information about the 'sharp' mode and the possibility to specify the duration of the pause before the SoX executable actuall starts recording of the sound representation. If in the second command line argument there is letter 's' at the end, then the printing is omitted.

recommendSharp :: String -> IO () Source #

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.

Cleaning

cleanTemp :: IO () Source #

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

cleanTempN :: IO () Source #

Function cleanTempN removes all the intermediate temporary files produced during a noise profile creation in the directory where it is called from.