title: Azure speech-to-text - Continuos Recognition
body: <p>I would like to see the accuracy of the speech services from Azure, specifically speech-to-text using an audio file.</p>
  
  <p>I have been reading the documentation <a href="https://docs.microsoft.com/en-us/python/api/azure-cognitiveservices-speech/?view=azure-python" rel="nofollow noreferrer">https://docs.microsoft.com/en-us/python/api/azure-cognitiveservices-speech/?view=azure-python</a> and playing around with a suggested code from the MS quickstar page. The code workds fine and I can get some transcription, but it just transcribes the beginning of the audio (first utterance):</p>
  
  <pre><code>import azure.cognitiveservices.speech as speechsdk
  
  speechKey = 'xxx'
  service_region = 'westus'
  
  speech_config = speechsdk.SpeechConfig(subscription=speechKey, region=service_region, speech_recognition_language="es-MX")
  audio_config = speechsdk.audio.AudioConfig(use_default_microphone=False, filename='lala.wav')
  
  sr = speechsdk.SpeechRecognizer(speech_config, audio_config)
  
  es = speechsdk.EventSignal(sr.recognized, sr.recognized)
  
  result = sr.recognize_once()
  
  if result.reason == speechsdk.ResultReason.RecognizedSpeech:
      print("Recognized: {}".format(result.text))
  elif result.reason == speechsdk.ResultReason.NoMatch:
      print("No speech could be recognized: {}".format(result.no_match_details))
  elif result.reason == speechsdk.ResultReason.Canceled:
      cancellation_details = result.cancellation_details
      print("Speech Recognition canceled: {}".format(cancellation_details.reason))
      if cancellation_details.reason == speechsdk.CancellationReason.Error:
          print("Error details: {}".format(cancellation_details.error_details))
  </code></pre>
  
  <p>Based on the documentation, looks like I have to use signals and events to capture the full audio using method start_continuous_recognition (which is not documented for python, but looks like the method and related classes are implemented). 
  I tried to follow other examples from c# and Java but was not able to implement this in Python.</p>
  
  <p>Has anyone been able to do this and provie some pointers?
  Thank you very much!</p>