mmsyn7ukr 0.7.5.0 → 0.7.6.0
raw patch · 4 files changed
+46/−15 lines, 4 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- ChangeLog.md +5/−0
- Processing_mmsyn7ukr.hs +31/−11
- README +9/−3
- mmsyn7ukr.cabal +1/−1
ChangeLog.md view
@@ -116,3 +116,8 @@ * Seventh version revised F. Fixed an issue with using not a minimum of the noise level for the noise reduction function tempeRa. Some minor documentation improvements.++## 0.7.6.0 -- 2020-01-23++* Seventh version revised G. Added a possibility not to reduce a noise. It is controlled by the first command line argument.+Some minor documentation improvements.
Processing_mmsyn7ukr.hs view
@@ -42,7 +42,7 @@ -- | 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 +-- 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). produceSound :: (String, String) -> FilePath -> IO () produceSound (actsctrl, noiseLim) file = onException (do {@@ -66,6 +66,14 @@ -- | Function 'produceSound3' is used internally in the 'produceSound2' function. produceSound3 :: (String, String) -> (FilePath, FilePath) -> String -> (Int, Double) -> Double -> IO () produceSound3 (actsctrl, noiseLim) (file, file1) soundUkr (noiseMax, duration0) lim0 = case actsctrl of+ "-1" -> + do+ lim1 <- durationA "8_x.wav"+ if lim1 <= 0.0+ then beginProcessing (file, file1) soundUkr (actsctrl, noiseLim)+ else do + resampleA "8_x.wav" (22050::Int)+ produceSound4 (file, file1) "38_x.wav" "0" -> do lim1 <- durationA "8_x.wav"@@ -111,7 +119,7 @@ -- | 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 .+-- the input file. produceSound4 :: (FilePath, FilePath) -> FilePath -> IO () produceSound4 (file, file1) fileB = do norm fileB@@ -144,18 +152,23 @@ then recA "x.wav" longerK else recA "x.wav" 3.0 ; putStrLn "The file is recorded and now will be automatically processed. You will be notificated with the text message in the terminal about the creation of the needed file. Please, wait a little. "- ; _ <- readProcessWithExitCode (fromJust (showE "sox")) ["x.wav", "_x.wav", "noisered", "nx0.wav.b.prof"] ""+ ; if actsctrl == "-1"+ then do+ _ <- readProcessWithExitCode (fromJust (showE "sox")) ["x.wav", "_x.wav", "noisered", "nx0.wav.b.prof"] ""+ return ()+ else renameFile "x.wav" "_x.wav" ; norm "_x.wav" ; lim0 <- durationA "8_x.wav" ; putStrLn ""- ; putStrLn "If you specified as a first command line argument the following the program behaves: "+ ; putStrLn "If you specified as a first command line argument one of the numbers below the program behaves as follows: "+ ; putStrLn "-1 -> the program does not reduce noise, it only resamples the audio to the needed 22050 Hz and adjusts the amplitude;" ; putStrLn "0 -> after the noise reduction the program only resample the audio to the needed 22050 Hz and adjusts the amlitude; " ; putStrLn "1 -> after the noise reduction the program additionally to the 0-processing truncates the silence from the beginning and end of the audio to the level given by the second command line parameter; " ; putStrLn "2 -> after the noise reduction the program additionally to the 1-processing applies a double band-reject filter to the audio (SoX \"sinc\" effect); " ; putStrLn "3 -> after the noise reduction the program additionally to the 2-processing applies fade-in and fade-out effects to the audio; " ; putStrLn "_ -> is the same as 3. " ; putStrLn ""- ; putStrLn "If you specified as a second command line argument the following the program behaves: "+ ; putStrLn "If you specified as a second command line argument one of the numbers below the program behaves as follows: " ; putStrLn "0 -> the maximum amplitude, starting from which the file will not be trimmed for the first command line argument greater of 1, is 0.01; " ; putStrLn "1 -> the maximum amplitude, starting from which the file will not be trimmed for the first command line argument greater of 1, is 0.02; " ; putStrLn "2 -> the maximum amplitude, starting from which the file will not be trimmed for the first command line argument greater of 1, is 0.04; "@@ -207,18 +220,23 @@ then recA "x.wav" longerK else recA "x.wav" 3.0 ; putStrLn "The file is recorded and now will be automatically processed. You will be notificated with the text message in the terminal about the creation of the needed file. Please, wait a little. "-; _ <- readProcessWithExitCode (fromJust (showE "sox")) ["x.wav", "_x.wav", "noisered", "nx0.wav.b.prof"] ""+; if actsctrl /= "-1"+ then do+ _ <- readProcessWithExitCode (fromJust (showE "sox")) ["x.wav", "_x.wav", "noisered", "nx0.wav.b.prof"] ""+ return ()+ else renameFile "x.wav" "_x.wav" ; norm "_x.wav" ; lim0 <- durationA "8_x.wav" ; putStrLn ""-; putStrLn "If you specified as a first command line argument the following the program behaves: "-; putStrLn "0 -> after the noise reduction the program only resample the audio to the needed 22050 Hz and adjusts the amlitude; "+; putStrLn "If you specified as a first command line argument one of the numbers below the program behaves as follows: "+; putStrLn "-1 -> the program does not reduce noise, it only resamples the audio to the needed 22050 Hz and adjusts the amplitude;"+; putStrLn "0 -> after the noise reduction the program only resamples the audio to the needed 22050 Hz and adjusts the amlitude; " ; putStrLn "1 -> after the noise reduction the program additionally to the 0-processing truncates the silence from the beginning and end of the audio to the level given by the second command line parameter; " ; putStrLn "2 -> after the noise reduction the program additionally to the 1-processing applies a double band-reject filter to the audio (SoX \'sinc\' effect); " ; putStrLn "3 -> after the noise reduction the program additionally to the 2-processing applies fade-in and fade-out effects to the audio; " ; putStrLn "_ -> is the same as 3. " ; putStrLn ""-; putStrLn "If you specified as a second command line argument the following the program behaves: "+; putStrLn "If you specified as a second command line argument one of the numbers below the program behaves as follows: " ; putStrLn "0 -> the maximum amplitude, starting from which the file will not be trimmed for the first command line argument greater of 1, is 0.01; " ; putStrLn "1 -> the maximum amplitude, starting from which the file will not be trimmed for the first command line argument greater of 1, is 0.02; " ; putStrLn "2 -> the maximum amplitude, starting from which the file will not be trimmed for the first command line argument greater of 1, is 0.04; "@@ -266,11 +284,13 @@ let rems = filter (\x -> head x == 'n') filenames in mapM_ removeFile rems -- | Function 'tempeRa' is used to create a noise profile for all the recorded sounds. If you provide a 5 seconds silence as needed, the program will--- reduce the noise in your recordings. This will create a cleaner sound.+-- 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,+-- spcify \"-1\" as the first command line argument for the program @mmsyn7ukr@. tempeRa :: IO () tempeRa = do { putStrLn "Now, please, be in a silence for 5 seconds so that the program can create a noise profile to remove the noise from the recording. "- ; putStrLn "Otherwise, the program can remove from the recorded sound data some important parts as a noise."+ ; putStr "Otherwise, the program can remove from the recorded sound data some important parts as a noise. If you would like not to reduce "+ ; putStrLn "the noise at all, then, please, specify as the first command line argument \"-1\". " ; recA "nx1.wav" 0.07 ; threadDelay 100000 ; recA "nx2.wav" 0.07
README view
@@ -75,7 +75,7 @@ be improved so there is NO guarantees that the given technology or its successors cannot be used in violating your voice identity to produce from some available voice records the voice for the -inappropriate usage. Therefore, better is to proove your identity not +inappropriate usage. Therefore, better is to prove your identity not only with the solely voice itself but with some additional independent sources and measures. @@ -86,7 +86,9 @@ ***** Command Line Arguments ***** If you specify as a first command line argument one of the numbers below-the program behaves as follows: +the program behaves as follows:+ -1 -> the program does not reduce noise, it only resamples+ the audio to the needed 22050 Hz and adjusts the amplitude; 0 -> after the noise reduction the program only resample the audio to the needed 22050 Hz and adjusts the amlitude; 1 -> after the noise reduction the program additionally @@ -142,7 +144,11 @@ At the beginning the program also creates a noise profile (once per execution). It is now used to reduce the noise level for the recorded sound representations. It uses the default SoX noise reducing settings with a hope that for you they can-be sufficient.+be sufficient. If you see that the program removes some sensitive and+important sound data from the recorded by it sound representations,+then you can specify as a first command line argument "-1". The program+in such a case will create a noise profile as usual, but will not reduce+the noise at all. ***** Ukrainian Localization *****
mmsyn7ukr.cabal view
@@ -2,7 +2,7 @@ -- documentation, see http://haskell.org/cabal/users-guide/ name: mmsyn7ukr-version: 0.7.5.0+version: 0.7.6.0 synopsis: A simple basic interface to some SoX functionality or to produce a voice that can be used by mmsyn7h description: A program and a library that can be used as a simple basic interface to some SoX functionality or to produce your voice in Ukrainian (if you pronounce the sounds properly) represented by the separate sounds or something special like soft sign. homepage: https://hackage.haskell.org/package/mmsyn7ukr