Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions plugins/openai/src/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,6 @@ export type GroqChatModels =
| 'openai/gpt-oss-120b'
| 'openai/gpt-oss-20b';

export type GroqAudioModels = 'whisper-large-v3' | 'whisper-large-v3-turbo';

export type DeepSeekChatModels = 'deepseek-coder' | 'deepseek-chat';

export type TogetherChatModels =
Expand Down
31 changes: 1 addition & 30 deletions plugins/openai/src/stt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import { type AudioBuffer, mergeFrames, normalizeLanguage, stt } from '@livekit/agents';
import type { AudioFrame } from '@livekit/rtc-node';
import { OpenAI } from 'openai';
import type { GroqAudioModels, WhisperModels } from './models.js';
import type { WhisperModels } from './models.js';

export interface STTOptions {
apiKey?: string;
Expand Down Expand Up @@ -68,35 +68,6 @@ export class STT extends stt.STT {
});
}

/**
* Create a new instance of Groq STT.
*
* @remarks
* `apiKey` must be set to your Groq API key, either using the argument or by setting the
* `GROQ_API_KEY` environment variable.
*/
static withGroq(
opts: Partial<{
model: string | GroqAudioModels;
apiKey?: string;
baseURL?: string;
client: OpenAI;
language: string;
detectLanguage: boolean;
}> = {},
): STT {
opts.apiKey = opts.apiKey || process.env.GROQ_API_KEY;
if (opts.apiKey === undefined) {
throw new Error('Groq API key is required, whether as an argument or as $GROQ_API_KEY');
}

return new STT({
model: 'whisper-large-v3-turbo',
baseURL: 'https://api.groq.com/openai/v1',
...opts,
});
}

/**
* Create a new instance of OVHcloud AI Endpoints STT.
*
Expand Down
Loading