text-to-speech: enable use from command-line.
parent
45ebfcf4eb
commit
008b653951
|
@ -1,8 +1,9 @@
|
||||||
! Copyright (C) 2013 John Benediktsson
|
! Copyright (C) 2013 John Benediktsson
|
||||||
! See http://factorcode.org/license.txt for BSD license
|
! See http://factorcode.org/license.txt for BSD license
|
||||||
|
|
||||||
USING: combinators generic kernel math math.text.english present
|
USING: combinators command-line generic io kernel math
|
||||||
strings system ui.operations vocabs ;
|
math.text.english namespaces present sequences strings system
|
||||||
|
ui.operations vocabs ;
|
||||||
|
|
||||||
IN: text-to-speech
|
IN: text-to-speech
|
||||||
|
|
||||||
|
@ -26,3 +27,12 @@ M: object speak present speak-text ;
|
||||||
M: integer speak number>text speak-text ;
|
M: integer speak number>text speak-text ;
|
||||||
|
|
||||||
[ \ present ?lookup-method ] \ speak H{ } define-operation
|
[ \ present ?lookup-method ] \ speak H{ } define-operation
|
||||||
|
|
||||||
|
: speak-main ( -- )
|
||||||
|
command-line get [
|
||||||
|
[ speak ] each-line
|
||||||
|
] [
|
||||||
|
" " join speak
|
||||||
|
] if-empty ;
|
||||||
|
|
||||||
|
MAIN: speak-main
|
||||||
|
|
Loading…
Reference in New Issue