🗣📝 Microservice for transcribing audio files uploaded to sanity.io
This transcription microservice is an example for how to leverage webhooks in Sanity. It takes uploaded audio files, and requests a transcription from assemblyai, and writes that on the file asset metadata. Obviously, it works best on spoken tracks (such as podcasts) and your machine learning fueled milage may vary (it's always fun though!).
The Python app uses Sanic, which is a Flask-like server with support for Python 3.5’s async capabilities, and is inspired by this blog on how to write such a microservice.
(remember to ☑️ Build using Docker
)
Or clone this repo and follow these instructions:
- Register an account at assemblyai.com to get an API token
- Generate a Sanity token with write permissions at manage.sanity.io
- Find your project ID and dataset name (
$ sanity projects list
) - Add an optional Slack Webhook URL if you want the service to notify a slack channel of ready transcriptions.
- Run
now
and paste the variables when prompted - The
now
app URL should be copied automatically to your clipboard. You can now runsanity hook create
in your Sanity project folder and paste in the URL when prompted for it. - That's it!