Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.math.mathematica

Topic: Speak Command in Ver 9
Replies: 0  

Advanced Search

Back to Topic List Back to Topic List  
Dana DeLouis

Posts: 24
Registered: 11/18/12
Speak Command in Ver 9
Posted: Feb 16, 2013 1:08 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply


Hello. I have a question on the Speak command in Math 9.
I'm using a Mac computer if it makes a difference.
I can't seem to have it read back numbers consistently with the decimal point.
I was wondering if anyone here knew why.
The idea here is that I enter data that I read from a text book, or perhaps a piece of paper.
i enter the data, and then have the program read it back to me to make sure I typed it in correctly.
The code is below. Here's some simple data to explain the issue.

v1={123.4567890123, N[Pi]}

{123.4567890123`, 3.141592653589793`}


The first number is correctly read back as "1 2 3 point 4 5 6=85"
However, for the second number, the decimal point is skipped.
"3 1 4 1 5=85"

Other examples do this at what appears to be random times.
I can't seem to figure it out.

Here's another example;


m=RandomReal[{0,2},{2,2}];
m//MatrixForm
(1.09281 0.271472
0.242919 1.62972
)

For this particular set of numbers, it skips the decimal point in the first number.
"1 0 9 2 8 1=85"

For the second and third numbers, it uses the word "Dot" for the decimal point.

"zero dot 2 7 1 4 =85"
"zero dot 2 4 2 9 =85"

For the last one, it uses "point" instead.

"1 point 6 2 9 7 =85"


I just can't figure out why it skips reading the decimal point in some numbers.

Here's my code:

ReadBack[v_List]:=Module[{s},
Pause[1];
(* Allow Time to get ready *)
s=StringJoin["I will read the list of ",ToString[Length[Flatten[v]]]," items back to you"];
Speak[s];
Pause[3];
Speak[v,
"RealPrecisionLimit"->\[Infinity],
"IncludeParentheses"->True]
]



v1={123.4567890123,N[Pi]}

{123.4567890123`,3.141592653589793`}

ReadBack[v1]


Again, I'm not sure why it skips the decimal point in the second number above.
It appears like it should be read with this code.

SpokenString[v1,"RealPrecisionLimit"->\[Infinity],
"IncludeParentheses"->True]

the list 123.4567890123, 3.141592653589793


Also, I don't seem to be able to find an option setting to tell the Speak command to wait till it is finished before moving on to the next line.
In other words, the Pause[3] is running while the speak command is running.

test3[]:=Module[{},
Print[DateList[]];
Speak["This is just a very long sentence about nothing"];
Print[DateList[]];
]

test3[]
{2013,2,15,15,49,4.201141}
{2013,2,15,15,49,4.209637}

As one can see, it's processing the next command while the Speak command is working.


Speak["Thank you for your help"]


= = = = = = = = = =
Thank you. :>)
Dana DeLouis
Mac, and MathM 9.
= = = = = = = = = =






Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.