LoslegenKostenlos loslegen

Multiple Speakers 1

If your goal is to transcribe conversations, there will be more than one speaker. However, as you'll see, the recognize_google() function will only transcribe speech into a single block of text.

You can hear in this audio file there are three different speakers.

But if you transcribe it on its own, recognize_google() returns a single block of text. Which is still useful but it doesn't let you know which speaker said what.

We'll see an alternative to this in the next exercise.

The multiple speakers audio file has been imported and converted to AudioData as multiple_speakers.

Diese Übung ist Teil des Kurses

Spoken Language Processing in Python

Kurs anzeigen

Anleitung zur Übung

  • Create an instance of Recognizer.
  • Recognize the multiple_speakers variable using the recognize_google() function.
  • Set the language to US English ("en-US").

Interaktive Übung

Versuche dich an dieser Übung, indem du diesen Beispielcode vervollständigst.

# Create a recognizer class
recognizer = sr.____()

# Recognize the multiple speaker AudioData
text = recognizer.recognize_google(____, 
                       			   language=____)

# Print the text
print(text)
Code bearbeiten und ausführen