[Tutor] sending a wav file to a website?

Alan Gauld alan.gauld at btinternet.com
Wed Feb 13 02:10:38 CET 2013


On 12/02/13 20:48, richard kappler wrote:

> So the question is, how do I get a wav file to a website like the one
> listed above and retrieve the text result using python

Can you be a bit more explicit?
You can send the file to a url using http or ftp.
That will create a copy of the file on the remote server
but I get the feeling that's not what you mean?

> I've looked at and played around with urllib, I get how it works, I'm
> pretty comfy with it, but it seems to be for sending text only?

It speaks http, and http is a text based protocol, like most internet 
protocols. But urllib is normally used for reading from a url not 
writing files to it. (Although it might support that too, but I've never 
used it for that...)

> I can use rec in the terminal (command line) to record speech into
> a wav file, I'm pretty sure I can figure out how to make it start and
> stop recording as desired, ...

Creating a wav file is completely different to sending it to a remote 
server.

> ... but sending the wav file to the
> url and retrieving the text for further processing has me a bit baffled.

But this bit I don't understand? Do you mean sending the file itself?
Or are you trying to play the recorded sound over the network to a url?
If the latter how do you imagine the server will respond?What text do 
you expect back?

I'm confused.

-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/



More information about the Tutor mailing list