Message Boards Message Boards

0
|
5826 Views
|
5 Replies
|
1 Total Likes
View groups...
Share
Share this post:

Error when speaking integer names

Strange error with Speak. Listen to what this says:

IntegerName[76,"Words"]
Speak[%]

My computer says "seventy". But now type in the integer name:

Speak["seventy-six"]

Now I hear seventy six. Can anyone explain what is going on here? I am running Mathematica 12.1.1 under Mac OS Big Sur 11.0.1.

POSTED BY: John Shonder
5 Replies

Thanks everyone. By the way this bug is even stranger when you try it on Wolfram Cloud. The output of Speak[IntegerName[76,"Words"]] includes the six, but changes the pronunciation of seventy (as compared with Speak[IntegerName[70,"Words"]] ).

POSTED BY: John Shonder
Posted 4 years ago

Hi John,

Looks like a bug, you should report it to Wolfram Support. The first case does not work because

IntegerName[76, "Words"] // FullForm
(* seventy\[Hyphen]six *)

Speak should be able to deal with hyphenated words.

POSTED BY: Rohit Namjoshi
Posted 4 years ago

You can work around this by replacing the hyphens:

numberText = IntegerName[76]
Speak[StringReplace[numberText, "\[Hyphen]" -> "-"]]
POSTED BY: Joel Klein
Posted 4 years ago

The output of IntegerName is using a hyphen character, but the second input uses a dash. Speak must be having a problem with the hyphen.

I saw this by going to the output cell for IntegerName and using Ctrl-Shift-E to reveal the underlying box structure, and as soon as I saw \[Hyphen] I suspected that was going to be the difference.

POSTED BY: Joel Klein

I can reproduce the same problem with Wolfram Desktop 12.1.1

POSTED BY: Ahmed Elbanna
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract