Skip to main content
edited tags
Link
Kuba
  • 137.7k
  • 13
  • 289
  • 751
Tweeted twitter.com/StackMma/status/962887276169781248
Source Link
user5601
  • 3.8k
  • 2
  • 24
  • 59

How to CloudDeploy an APIFunction that takes audio as input?

I have a function whose argument is Audio and I'd like to deploy it as an API (and then call it from Python). This works as with FormPage[] as follows:

CloudDeploy[
 FormPage[{{"ex", "Upload WAV file:"} -> "UploadedFile"}, 
  AudioPlot@Import[#ex] &]]

But I'm not sure how to set it up with APIFunction[] and then call it as a HTTP GET request. I can assume they are WAV files if that makes it easier.