mmsyn7ukr 0.6.1.1 → 0.6.2.0
raw patch · 5 files changed
+33/−9 lines, 5 files
Files
- ChangeLog.md +4/−0
- Main.hs +5/−4
- README +4/−3
- ReplaceP.hs +19/−1
- mmsyn7ukr.cabal +1/−1
ChangeLog.md view
@@ -72,3 +72,7 @@ ## 0.6.1.1 -- 2020-01-10 * Sixth version revised B. Fixed documentation issues.++## 0.6.2.0 -- 2020-01-13++* Sixth version revised C. Fixed issues with wrongly parsed sounds that are represented with two letters ("дж", "дз", "сь", "ць").
Main.hs view
@@ -24,7 +24,7 @@ import System.Info (os) import CaseBi (getBFst') import qualified Data.Vector as V-import ReplaceP+import ReplaceP (replaceP, replaceP2, replaceP3) -- | Function responds for general program execution. It starts with CAUTION to be responsible for usage and to -- use it personally in some important cases (see README). Then the program guides you through the creating your Ukrainian \"voice\". @@ -120,7 +120,7 @@ else concat . drop 1 . take 1 $ args a2 = if null . drop 2 . take 3 $ args then []- else concat . drop 2 . take 3 $ args+ else drop 2 . take 3 $ args if null a2 then do paths <- mapM getDataFileName ["A.wav", "B.wav", "C.wav", "D.wav", "E.wav", "F.wav", "G.wav", "H.wav", @@ -137,13 +137,14 @@ putStrLn "" else do putStrLn ""- let rrs = show . head $ [[a2]]+ let rrs = show a2 list0 = read (replaceP rrs)::[String]+ zss = read (replaceP3 . replaceP2 . show $ rss)::[String] wws = map (getBFst' ("0.wav", V.fromList . zip ["а","б","в","г","д","дж","дз","е","ж","з","и","й","к","л","м","н","о","п","р","с", "сь","т","у","ф","х","ц","ць","ч","ш","ь","і","ґ"] $ ["A.wav", "B.wav", "C.wav", "D.wav", "E.wav", "F.wav", "G.wav", "H.wav", "I.wav", "J.wav", "K.wav", "L.wav", "M.wav", "N.wav", "O.wav", "P.wav", "Q.wav", "R.wav", "S.wav", "T.wav", "U.wav", "V.wav", "W.wav", "X.wav", "Y.wav", "Z.wav", "a.wav", "b.wav", "c.wav", - "d.wav", "e.wav", "f.wav"])) list0+ "d.wav", "e.wav", "f.wav"])) zss paths <- mapM getDataFileName wws copiedFs <- mapM getDataFileName ["-.wav", "0.wav", "1.wav"] mapM_ (produceSound (a0, a1)) paths
README view
@@ -1,7 +1,7 @@ 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 needed sound representations).+voice (actually it produces the needed sound representations). The program starts with Caution to be responsible for usage and to use it personally. Then the program guides you @@ -17,9 +17,10 @@ ***** CAUTION! ***** -"The possession of great power necessarily implies great responsibility."+"The possession of great power necessarily implies+great responsibility." - (William Lamb)+ (William Lamb) The program mmsyn7ukr produces the "voice" represented as an ordered set of sounds each of which corresponds (represents) one of the
ReplaceP.hs view
@@ -1,6 +1,6 @@ -- | -- Module : ReplaceP--- Copyright : (c) OleksandrZhabenko 2019-2020+-- Copyright : (c) OleksandrZhabenko 2020 -- License : MIT -- -- Maintainer : olexandr543@yahoo.com@@ -26,3 +26,21 @@ | x == ']' && y == '\"' && z == ']' = "\"]" ++ replaceP xs | otherwise = x:replaceP (y:z:xs) replaceP xs = xs++-- | Function is used internally to parse further the result dealt with 'replaceP' function.+replaceP2 :: String -> String+replaceP2 (x:y:z:u:v:xs) | [x,y,z,u,v] == "\\1078" = '\1078':replaceP2 xs+ | [x,y,z,u,v] == "\\1079" = '\1079':replaceP2 xs+ | [x,y,z,u,v] == "\\1100" = '\1100':replaceP2 xs+ | otherwise = x:replaceP2 (y:z:u:v:xs)+replaceP2 (x:xs) = x:replaceP2 xs+replaceP2 [] = []++-- | Function is used internally to parse finally the result into a @[String]@.+replaceP3 :: String -> String+replaceP3 (x:y:xs) | [x,y] == "\\ж" = "\\1078" ++ replaceP3 xs+ | [x,y] == "\\з" = "\\1079" ++ replaceP3 xs+ | [x,y] == "\\ь" = "\\1100" ++ replaceP3 xs+ | otherwise = x:replaceP3 (y:xs)+replaceP3 (x:xs) = x:replaceP3 xs+replaceP3 [] = []
mmsyn7ukr.cabal view
@@ -2,7 +2,7 @@ -- documentation, see http://haskell.org/cabal/users-guide/ name: mmsyn7ukr-version: 0.6.1.1+version: 0.6.2.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