summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOleksandrZhabenko <>2020-01-10 16:39:00 (GMT)
committerhdiff <hdiff@hdiff.luite.com>2020-01-10 16:39:00 (GMT)
commit5b033aff01415173b762aa06a78ee946d1a4d3ce (patch)
tree652d4d7a31030c5c4d0b6841be7d84c7fde5d8a1
parent03c67a3142a7afdfedf629da56946c618464fc58 (diff)
version 0.4.1.00.4.1.0
-rw-r--r--ChangeLog.md7
-rw-r--r--MMSyn7h.hs19
-rw-r--r--README11
-rw-r--r--mmsyn7h.cabal2
4 files changed, 31 insertions, 8 deletions
diff --git a/ChangeLog.md b/ChangeLog.md
index bb7d5f9..77bc28b 100644
--- a/ChangeLog.md
+++ b/ChangeLog.md
@@ -45,3 +45,10 @@ case and does not remove any resulting sound files.
## 0.4.0.3 -- 2020-01-10
* Fourth version revised C. Fixed an issue with documentation for the appendS16LEFileList function.
+
+## 0.4.1.0 -- 2020-01-10
+
+* Fourth version revised D. Fixed issues with package not being compiled.
+Improved informational messages.
+
+
diff --git a/MMSyn7h.hs b/MMSyn7h.hs
index dd5a588..8c728ea 100644
--- a/MMSyn7h.hs
+++ b/MMSyn7h.hs
@@ -43,9 +43,14 @@ main7h = bracketOnError (do
putStrLn "See https://hackage.haskell.org/package/mmsyn6ukr-0.6.2.0/docs/UkrainianLControl.html#v:genControl for more information."
putStr "You could specify e. g. \"o9-1\" or \"o5-1\" (and the most compressed audio in the .ogg format will be produced) or other option. "
putStrLn "If you have not specified the parameters and now would like to, please, terminate the running program and execute it again with the proper command line arguments. "
+ putStrLn ""
+ putStr "If you specified the second command line argument as \"s\" and then provided as the further command line arguments a Ukrainian text, then the program will use only those "
+ putStrLn "Ukrainian sounds representations, which were earlier produced for the sounds in the text. See further: https://hackage.haskell.org/package/mmsyn7s"
+ putStrLn ""
args <- getArgs
putStrLn "And now, please, specify the name of the resulting sound file! Please, do NOT use '}' character and space or control characters!"
nameOfSoundFile <- getLine
+ putStrLn ""
let nameSF = filter (\x -> not (isSpace x) && not (isControl x) && x /= '}') nameOfSoundFile in
return (args, nameSF)) (\(args, nameSF) -> do
putStr "Notice, there was (may be) CmdLineArgument exception. To avoid it, please, specify the command line argument (if needed) in the form \"ABC\""
@@ -59,8 +64,8 @@ main7h = bracketOnError (do
putStrLn ""
let xs = unwords . drop 2 $ args
ws = snd . genControl . concat $ arg
- ys = take (nSymbols (if null arg then [] else fst . genControl . head $ arg)) xs in
- withBinaryFile (nameSF ++ ".raw") AppendMode (appendS16LEFileList (convertToProperUkrainian ys, show7s xs))
+ ys = take (nSymbols (if null arg then [] else fst . genControl . head $ arg)) xs
+ withBinaryFile (nameSF ++ ".raw") AppendMode (appendS16LEFileList (convertToProperUkrainian ys, show7s xs))
putStrLn "The .raw file was created by the program. It will be processed further. "
let ts = fromJust (showE "sox") in do
_ <- readProcessWithExitCode ts (case fst ws of
@@ -69,10 +74,12 @@ main7h = bracketOnError (do
removeFile $ nameSF ++ ".raw"
if take 5 os == "mingw"
then do
- _ <- readProcessWithExitCode (fromJust . showE $ "sox") [nameSF ++ snd ws, "-t", "waveaudio", "-d"] "" >> return ()
+ _ <- readProcessWithExitCode (fromJust . showE $ "sox") [nameSF ++ snd ws, "-t", "waveaudio", "-d"] ""
+ return ()
else if isJust . showE $ "play"
then do
- _ <- readProcessWithExitCode (fromJust . showE $ "play") [nameSF ++ snd ws] "" >> return ()
+ _ <- readProcessWithExitCode (fromJust . showE $ "play") [nameSF ++ snd ws] ""
+ return ()
else error "SoX play is not installed properly in the system. Please, install it properly and execute the program again."
else do
putStrLn ""
@@ -102,8 +109,8 @@ main7h = bracketOnError (do
else error "SoX play is not installed properly in the system. Please, install it properly and execute the program again."
else do
let ws = snd . genControl . concat $ arg
- ys = take (nSymbols (if null arg then [] else fst . genControl . head $ arg)) xs in
- withBinaryFile (nameSF ++ ".raw") AppendMode (appendS16LEFile (convertToProperUkrainian ys))
+ ys = take (nSymbols (if null arg then [] else fst . genControl . head $ arg)) xs
+ withBinaryFile (nameSF ++ ".raw") AppendMode (appendS16LEFile (convertToProperUkrainian ys))
putStrLn "The .raw file was created by the program. It will be processed further. "
let ts = fromJust (showE "sox") in do
_ <- readProcessWithExitCode ts (case fst ws of
diff --git a/README b/README
index bda77cc..a512b5f 100644
--- a/README
+++ b/README
@@ -7,9 +7,18 @@ mmsyn7ukr).
Besides, you can remove the created by mmsyn7ukr and mmsyn7h files
while the last one is running, if you specified just one command line
argument.
+
If you specify the second command line argument "s" and then
-a list of @String@ represented the Ukrainian sounds, then
+String of the Ukrainian text, then
the program will use only these sounds representations
additionally to the default ones "-.wav", "0.wav" and "1.wav".
+To create the needed sound representations, please, execute
+mmsyn7s with the needed Ukrainian text to be sounded (being a
+command line arguments) and then use the resulting output as a third
+command line argument to the mmsyn7ukr program.
+For more information, refer to:
+https://hackage.haskell.org/package/mmsyn7ukr
+https://hackage.haskell.org/package/mmsyn7s
+
In such a case the program will not delete the created resulting
sound files.
diff --git a/mmsyn7h.cabal b/mmsyn7h.cabal
index 0066a75..7b5e578 100644
--- a/mmsyn7h.cabal
+++ b/mmsyn7h.cabal
@@ -2,7 +2,7 @@
-- documentation, see http://haskell.org/cabal/users-guide/
name: mmsyn7h
-version: 0.4.0.3
+version: 0.4.1.0
synopsis: Produces a sound recording specified by the Ukrainian text.
description: A program and a library that are used with mmsyn7ukr (or separately) and are similar to mmsyn6ukr executable. The program uses the data files in the current directory instead of ones in the system defined directories. It reads Ukrainian text with the given by data files sounds.
homepage: https://hackage.haskell.org/package/mmsyn7h