Speak Command in Ver 9
- To: mathgroup at smc.vnet.net
- Subject: [mg129819] Speak Command in Ver 9
- From: Dana DeLouis <dana01 at icloud.com>
- Date: Sat, 16 Feb 2013 01:09:44 -0500 (EST)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
- Delivered-to: l-mathgroup@wolfram.com
- Delivered-to: mathgroup-newout@smc.vnet.net
- Delivered-to: mathgroup-newsend@smc.vnet.net
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. = = = = = = = = = =
- Follow-Ups:
- Re: Speak Command in Ver 9
- From: Murray Eisenberg <murrayeisenberg@gmail.com>
- Re: Speak Command in Ver 9