Skip to content

v1.4.0

Compare
Choose a tag to compare
@marcusolsson marcusolsson released this 18 Mar 17:07
· 15 commits to main since this release
4f91eb8

What's Changed

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"
)