MACSCRPT Archives

July 2008

MACSCRPT@LISTSERV.DARTMOUTH.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
"Gary (Lists)" <[log in to unmask]>
Reply To:
Macintosh Scripting Systems <[log in to unmask]>
Date:
Thu, 24 Jul 2008 04:26:23 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (43 lines)
"Christoph Draxler" wrote:

> and the file should be saved in a wave-file


Then "Timothy Bates" replied:
> I'd recommend just running this in the terminal (cmd-space terminal)
> [...]
> curl 'http://[...]/speech?session=[001-100]&item=[001-100]}' -o '#1_#2.wav'

But this, of course, does not make the file a wave file.


I do endorse the curl method in general. If this is a batch job (the OP
doesn't specifically say that, it's merely assumed in the reply) then the
provided curl is a fine example, given the naming (as .wav) caveat.

In that sense, I probably wouldn't provide any specific filename changing --
just use the range operators for curl to get a bunch of files, if that's the
goal -- and then handle any "to wave" conversion as a separate process,
depending on what the files are to begin with.

Christoph,

You say you need to do that via Safari because that's how you're accustomed
to searching/viewing/retrieving these audio files.  However, doing this
outside Safari is probably easier, as you can see from the short line of
curl.

The presence of "session" in your URL suggests that you may need a more
complex curl to handle sessions, if the host gives problems from a plain
curler approach.  You may need session cookies, too.

Also, I would recommend, as I said, not simply renaming files to a new
extension (.wav) if they are not that file type.

Just download the files, as Timothy suggests, with curl modifications as
needed, and then convert with any number of free, and probably even
scriptable, conversion tools to produce wave files.

-- 
Gary

ATOM RSS1 RSS2