// SPDX-FileCopyrightText: 2024 LiveKit, Inc.
//
// SPDX-License-Identifier: Apache-2.0
import { STT } from '@livekit/agents-plugin-openai';
import { tts } from '@livekit/agents-plugins-test';
import { describe, it } from 'vitest';
import { TTS } from './tts.js';

const hasDeepgramTtsConfig = Boolean(process.env.DEEPGRAM_API_KEY && process.env.OPENAI_API_KEY);

if (hasDeepgramTtsConfig) {
  describe('Deepgram', async () => {
    await tts(new TTS(), new STT());
  });
} else {
  describe('Deepgram', () => {
    it.skip('requires DEEPGRAM_API_KEY and OPENAI_API_KEY', () => {});
  });
}
