In this guide, you’ll learn how to perform automatic language detection (ALD) separately from the transcription process. For the transcription, the file then gets routed to either the model class, depending on the supported language.
assemblyai
package and set your API key:
Transcriber
. Note that here we don’t pass in a global TranscriptionConfig
, but later apply different ones during the transcribe()
call.
detect_language()
performs language detection on the first 60 seconds of the audio using Nano and returns the language code.transcribe_file()
performs the transcription using Best or Nano depending on the identified language.