Add handler for audio models with an example
Add new handler for audio models along with an example for pre / post processing of audio data.
We are unable to get any pre-trained audio model. Is it possible to get any pre-trained audio model for this? There is WaveGlow based model which is a text to audio model however not a pure audio model.
@dhaniram-kshirsagar Please add the example for WaveGlow based model to examples.
Added waveglow based text to speech synthesizer example in stage_release branch.
Commit : https://github.com/pytorch/serve/commit/08483a41525bc66e8872a49806a484b2a76a706a
There were some documentation issues, which I just fixed in-place.
The .pth file that's supposed to contain the model comes back empty. To wit:
> curl -0 https://api.ngc.nvidia.com/v2/models/nvidia/waveglowpyt_fp32/versions/1/files/nvidia_waveglowpyt_fp32_20190306.pth > nvidia_waveglowpyt_fp32_20190306.pth
...
> ls -l
-rw-rw-r-- 1 ubuntu ubuntu 0 Mar 5 20:45 nvidia_waveglowpyt_fp32_20190306.pth
I tried a few variations, including pulling the model down from the PyTorch hub, but couldn't get anything to work. This was on a p2.xlarge instance.
@fbbradheintz : the nvidia_waveglowpyt_fp32_20190306.pth url internally redirects to s3 location. You need to use -L flag with the curl command to handle redirction.
curl -L https://api.ngc.nvidia.com/v2/models/nvidia/waveglowpyt_fp32/versions/1/files/nvidia_waveglowpyt_fp32_20190306.pth > nvidia_waveglowpyt_fp32_20190306.pth
Or use the wget command :
wget https://api.ngc.nvidia.com/v2/models/nvidia/waveglowpyt_fp32/versions/1/files/nvidia_waveglowpyt_fp32_20190306.pth > nvidia_waveglowpyt_fp32_20190306.pth
I'll give that a try. Please document this, as some people will be trying this from a terminal environment.
The speech synthesis example worked for me, once I had the model downloaded correctly.
Please close after merging.
Reopening and adding v0.11 milestone
As noted in a comment on #258, there is one other item: At the team status meeting today, it was raised that this is not really a complete example, as it stashes the output in a file in /tmp - which does the requester no good if they're on another machine. To make the example truly valuable, it should package the file for download with the HTTP response.