Git Product home page Git Product logo

speechtotextdemo's Introduction

Speech to Text Batch Transcription Serverless Demo

  • Deploy to Azure Original deploy via portal.azure.com - working
  • Viszualize
  • Deploy to Azure New deploy portal, template validation failing on linked templates - last checked July 2019

This template demonstrates a serverless approach to calling the Azure cognitive services speech batch transcription api. Once deployed you can copy supported audio files (wav, mp3, ogg) to the audio container in the storage account and the solution will automatically queue your file for transcription using speech services. Once complete the transcription files will be copied back to the transcript container.

This template uses the sample batch api code found here. Instead of using a console app we use azure functions to start the transcriptions and instead of polling for complettion we use the webhook to callback into azure functions. The callback function then copies the transcript back into the origin blob storage account.

Implementation Notes

  • The RegisterCallback component is not yet idempotent and will register multiple webhooks if you run the template more than once
  • you may notice the dependacy chain in the template is not what you expect and the register callback depends on several resources it does not need, this is because if the registercallback ran too early the function had not yet restarted with the required appSettings and was failing, adding these dependacies gave time for the function to recylce. An alterntative could be to send parameters subscriptionid, region and callbackurl in the querystring or have the event grid trigger check the callback is registered on each event
  • had an issue with HttpClient.PostAsJsonAsync in batchClient when running as a function it was always getting a bad request response from the api, we believe this was due to a bug which was setting Content-Length to 0. As a workaround we used StringContent and JsonConvert.SerialiseObject
  • Ran into issues trying to use a function trigger url when the function was deployed from github. found a work around here which uses a linked template and the deployment resources has a dependsOn link to the sourcecontrol resource. I did try using a nested template but it failed, it must be a linked template. This issue seems to come from the listsecrets arm function. it seems to evaluate as soon as the function app is created even if the resrouce you have it in has a dependson to the sourcecontrol resource. using a linked template was the only way i could defer the evaluation, i was suprised nested did not work.
  • Initially we had issues registering the eventgrid subscription with the eventgrid binding in azure funtions due to the different webhook url used for eventgrid bindings. The biggest issues was the eventgrid trigger requires the function app master key and will not work with other keys. The inital listkeys function call i was using would not return the master key and so i used an azure funtion to return the key embedded in an arm template as shown here (this function has now been removed). I later discovered that the listkeys function had been updated and it was possible to get the master key issue descriped here
  • The RegisterCallback component is not yet idempotent and will register multiple webhooks if you run the template more than once

speechtotextdemo's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.