If you only want to transcribe a portion of your file, you can set the audio_start_from and the audio_end_at parameters in your transcription config.
audio_start_from
audio_end_at
1import assemblyai as aai23aai.settings.api_key = "<YOUR_API_KEY>"45# audio_file = "./local_file.mp3"6audio_file = "https://assembly.ai/wildfires.mp3"78config = aai.TranscriptionConfig(9 audio_start_from=5000, # The start time of the transcription in milliseconds10 audio_end_at=15000 # The end time of the transcription in milliseconds11)1213transcript = aai.Transcriber(config=config).transcribe(audio_file)1415if transcript.status == "error":16 raise RuntimeError(f"Transcription failed: {transcript.error}")1718print(transcript.text)