v1.4.0
What's Changed
- Sync from internal repo (2024-03-18) by @marcusolsson in #15
Full Changelog: v1.3.0...v1.4.0
New Features
Temporary auth tokens for Real-Time Transcription
You can now issue temporary auth tokens for real-time transcription.
To create a new temporary token, use CreateTemporaryToken
:
client := assemblyai.NewClient("YOUR_API_KEY")
resp, _ := client.RealTime.CreateTemporaryToken(ctx, 480)
fmt.Println(assemblyai.ToString(resp.Token))
To create an authenticated real-time client, configure the temporary token with the WithRealTimeAuthToken
option:
realtimeClient := assemblyai.NewRealTimeClientWithOptions(
assemblyai.WithRealTimeAuthToken(token),
assemblyai.WithHandler(&handler),
)
realtimeClient.Connect(ctx)
Enhancements
This release also adds enums for LeMUR models and speech models:
LeMUR models
const (
// LeMUR Default is best at complex reasoning. It offers more nuanced
// responses and improved contextual comprehension.
LeMURModelDefault LeMURModel = "default"
// LeMUR Basic is a simplified model optimized for speed and cost. LeMUR
// Basic can complete requests up to 20% faster than Default.
LeMURModelBasic LeMURModel = "basic"
// Claude 2.1 is similar to Default, with key improvements: it minimizes
// model hallucination and system prompts, has a larger context window, and
// performs better in citations.
LeMURModelAssemblyAIMistral7B LeMURModel = "assemblyai/mistral-7b"
// LeMUR Mistral 7B is an LLM self-hosted by AssemblyAI. It's the fastest
// and cheapest of the LLM options. We recommend it for use cases like basic
// summaries and factual Q&A.
LeMURModelAnthropicClaude2_1 LeMURModel = "anthropic/claude-2-1"
)
Speech models
const (
// The Nano tier is a lightweight model that is optimized for speed and cost.
SpeechModelNano SpeechModel = "nano"
// Conformer-2 is a heavy-duty model optimized for accuracy.
SpeechModelConformer2 SpeechModel = "conformer-2"
)