[racket] sound.ss teachpack

From: John Riedl (riedl at cs.umn.edu)
Date: Tue Jul 19 16:03:38 EDT 2011


Thank you for your explanation.  I've gotten speak-word and speak-list
working now.  There were several challenges:

1. HtDP talks about sound.ss.  There is a sound.ss distributed with
racket 5.1.1, but it's the deinprogramm version, which supports
completely different commands.  If you want the speak-word function
you need the sound.ss teachpack from

2. Once you've installed that teachpack, you need to load it with
(require htdp/Sound/sound).

3. On Linux the built-in sounds are recorded in a .wav file format
that my version of the default sound command for DRRacket, aplay, (on
Ubuntu) cannot play.  I had to change the sound program to "play"
(which is the sox command-line tool that plays most types of audio).
To do that, add (|GRacket:playcmd| "play") to your preferences file.
((find-system-path 'pref-file) will show you where your preference
file is located.  The vertical bars are needed since GRacket is case
sensitive, but the default preference file is case insensitive.)

4. Under Ubuntu my sox library did not include most of the converters.
 You can install the rest of them with "sudo apt-get install
libsox-fmt-all", if you have sudo privileges.


On Mon, Jul 18, 2011 at 9:28 PM, Matthias Felleisen
<matthias at ccs.neu.edu> wrote:
> Well, yes, if you solve the problem and plug the solution into
> the teachpack as advertised, you get to hear Stephanie Weirich
> pronounce the numbers. -- Matthias
> On Jul 18, 2011, at 9:28 PM, John Riedl wrote:
>> Thanks.  The sound.ss install worked fine from Windows 7, and plays
>> .wav files, as advertised.
>> What I was going from to expect speak-word and speak-list was this
>> quote from HtDP:
>> -----------
>> Once the controller returns the correct list for amounts whose dollar
>> and cent amounts are between 0 and 20, test the controller with a
>> computer that can speak. Set the teachpack to sound.ss, which makes
>> two operations available: speak-word and speak-list. The first accepts
>> a symbol or a number, the second a list of symbols and numbers. Both
>> pronounce the symbols they consume. Evaluate the following expressions
>> (speak-word 1), (speak-list (cons 1 (cons 'dollar empty))), and
>> (speak-list (cons 'beautiful (cons 'lady empty))) to understand how
>> the operations operate.
>> ----------
>> What am I misunderstanding?
>> Thanks,
>> John
>> On Mon, Jul 18, 2011 at 7:39 PM, Matthias Felleisen
>> <matthias at ccs.neu.edu> wrote:
>>> That's all our sound teachpack ever did. The old one is located at
>>>  http://www.ccs.neu.edu/home/matthias/HtDP/Sound/
>>> As you can see, it hasn't been maintained in a while. Sorry, let us
>>> know if it works [I don't have time right now to try.]
>>> On Jul 18, 2011, at 5:44 PM, John Riedl wrote:
>>>> Hello.  What happened to the sound.ss teachpack, which apparently used
>>>> to include speak-word and speak-list methods.  Those sound great fun
>>>> for teaching ... but I can't find any evidence on the Web that it ever
>>>> existed, except for Google Books hits on HtDP :).  (Note that there is
>>>> a deinprogramm/sound.ss file in the current distro, but that just
>>>> plays sound files, which is less cool.)
>>>> Thanks,
>>>> John
>>>> _________________________________________________
>>>>  For list-related administrative tasks:
>>>>  http://lists.racket-lang.org/listinfo/users

Posted on the users mailing list.