def index():
# These code snippets use an open-source library.
response_post =
unirest.post("https://voicerss-text-to-speech.p.mashape.com/?key=key1",
headers={
"X-Mashape-Key": "key2",
"Content-Type": "application/x-www-form-urlencoded"
},
params={
"c": "mp3",
"f": "44khz_16bit_mono",
"hl": "en-us",
"r": 0,
"src": "Hello, world!"
}
)
return locals()
{{extend 'layout.html'}}
<audio controls>
<source src="{{=response_post}}" type="audio/mpeg">
unsupported
</audio>
<br>
{{=response_post.body}}
I verified that response_post has the correct body. I guess the problem
lies in the tag: source src="{{what to do here}}"
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.