Quickstart
Get up and running with Nur's Voice AI in under 5 minutes.
1
Get your API key
Sign up at nur.ai and navigate to the Dashboard to generate your API key. Your key starts with nur_ and should be kept secret.
1# Set your API key as an environment variable
2export NUR_API_KEY="nur_your_api_key_here"
2
Install the SDK
Install the official Nur SDK for your language of choice.
1pip install nur-ai
3
Generate your first speech
Create a client and generate speech from text in just a few lines of code.
1from nur import NurClient
2
3client = NurClient() # Uses NUR_API_KEY env var
4
5# Generate speech from text
6audio = client.tts.generate(
7 text="Welcome to Nur! This is your first generated speech.",
8 voice_id="rachel_v2",
9 language="en"
10)
11
12# Save to file
13audio.save("hello.mp3")
14print(f"Generated {audio.duration}s of audio")
4
Transcribe audio
Convert audio back to text with speaker diarization.
1# Transcribe an audio file
2transcript = client.stt.transcribe(
3 file="meeting.mp3",
4 speaker_diarization=True,
5 timestamps=True
6)
7
8print(transcript.text)
9
10# Print with speaker labels
11for segment in transcript.segments:
12 print(f"[{segment.speaker}] {segment.text}")