Article·assemblyai.com
speech-to-textaudio-aitranscriptionspeaker-diarizationaudio-intelligence
AssemblyAI
Explore AssemblyAI, a speech AI API platform, to transcribe audio/video, detect speakers, analyze sentiment, and more. This action pack guides you through setting up AssemblyAI and performing a basic transcription.
beginner10 min3 steps
The play
- Sign up for AssemblyAIGo to AssemblyAI's website (https://www.assemblyai.com/) and sign up for a free account to get your API key.
- Install the AssemblyAI Python clientOpen your terminal and install the AssemblyAI Python client using pip.
- Transcribe a local audio fileCreate a Python script, replace 'YOUR_API_KEY' with your actual AssemblyAI API key, and 'path/to/your/audio.wav' with the path to your audio file. Run the script to transcribe the audio.
Starter code
import assemblyai as aai
aai.settings.api_key = "YOUR_API_KEY"
config = aai.TranscriptionConfig(language_code="en_US")
transcriber = aai.Transcriber(config=config)
transcript = transcriber.transcribe("path/to/your/audio.wav")
print(transcript.text)Source