Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6131303
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T16:57:30+00:00 2026-05-23T16:57:30+00:00

UPDATE AFTER ANSWER: the code is now fixed and works look below for correct

  • 0

UPDATE AFTER ANSWER: the code is now fixed and works look below for correct code

Im trying to post from a perl script (on my server) to my google app engine, and im not sure how to go about doing this on the google app engine side.

This is my perl script for testing :

my $audio = `cat audiotest.flac`;
my $url = "http://app.appspot.com/MainPage" #this is not the real url
my $ua = LWP::UserAgent->new;
my $response = $ua->post($url, Content_Type => "audio/x-flac; rate=16000", Content => $audio);
if ($response->is_success)
{
 print $response->content;
}

So that is how i send the flac binary stream, but the question is how does google app engine receive it and do something with it. This is what im attempting to do in python (but the code is not correct and / or doesnt make sense)

class MainPage(webapp.RequestHandler):  
def post(self):
    destinationURL = "http://www.google.com/speech-api/v1/recognize?xjerr=1&client=chromium&lang=en-US"
    result = urlfetch.fetch(url=destinationURL, payload= self.request.body, method=urlfetch.POST, headers={'Content-Type': 'audio/x-flac; rate=16000'})  
    self.response.out.write(result.content)

result is supposed to return to me the string representation of the flac audio i submitted to google’s speech to text service (also known as x-webkit-speech). Any idea what i am supposed to put in the payload for the urlfetch, and how to get the result back? Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T16:57:31+00:00Added an answer on May 23, 2026 at 4:57 pm

    Since you’re sending the audio file as the body of the request, not as part of a form, you can access it with self.request.body.

    I’m a little confused as to why you’re sending an audio file to App Engine just so it can send it to another service, though.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

UPDATE - No need to answer this now, I have solved below. Hi, I'm
I'm trying to write an after update trigger that does a batch update on
I am trying to get knockout.js to update my view after an ajax call
Ok so after reading danben's answer on this post , I guess I'm convinced
Please read my update at the end of question after reading the answers: I'm
Update: After playing around with this for a few hours, went with a multi-query
Update: After some more reading I see that this problem is totally general, you
Is it possible to update the same view with new data? Using UPDATE after
If I raise an error in an AFTER UPDATE trigger in Sql Server 2005,
I have a table which is updated with ajax and after update it if

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.