Skip to content

Commit 95450d1

Browse files
Support Deepgram TTS (#755)
1 parent f42b63e commit 95450d1

File tree

6 files changed

+386
-1
lines changed

6 files changed

+386
-1
lines changed

.changeset/thick-chicken-raise.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@livekit/agents-plugin-deepgram': patch
3+
---
4+
5+
Support deepgram tts

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ Currently, only the following plugins are supported:
6565
| ---------------------------------------------------------------------------------------------------- | ------------- |
6666
| [@livekit/agents-plugin-openai](https://www.npmjs.com/package/@livekit/agents-plugin-openai) | LLM, TTS, STT |
6767
| [@livekit/agents-plugin-google](https://www.npmjs.com/package/@livekit/agents-plugin-google) | LLM, TTS |
68-
| [@livekit/agents-plugin-deepgram](https://www.npmjs.com/package/@livekit/agents-plugin-deepgram) | STT |
68+
| [@livekit/agents-plugin-deepgram](https://www.npmjs.com/package/@livekit/agents-plugin-deepgram) | STT, TTS |
6969
| [@livekit/agents-plugin-elevenlabs](https://www.npmjs.com/package/@livekit/agents-plugin-elevenlabs) | TTS |
7070
| [@livekit/agents-plugin-cartesia](https://www.npmjs.com/package/@livekit/agents-plugin-cartesia) | TTS |
7171
| [@livekit/agents-plugin-neuphonic](https://www.npmjs.com/package/@livekit/agents-plugin-neuphonic) | TTS |

plugins/deepgram/src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import { Plugin } from '@livekit/agents';
55

66
export * from './stt.js';
7+
export * from './tts.js';
78

89
class DeepgramPlugin extends Plugin {
910
constructor() {

plugins/deepgram/src/models.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,22 @@
22
//
33
// SPDX-License-Identifier: Apache-2.0
44

5+
export type TTSModels =
6+
| 'aura-asteria-en'
7+
| 'aura-luna-en'
8+
| 'aura-stella-en'
9+
| 'aura-athena-en'
10+
| 'aura-hera-en'
11+
| 'aura-orion-en'
12+
| 'aura-arcas-en'
13+
| 'aura-perseus-en'
14+
| 'aura-angus-en'
15+
| 'aura-orpheus-en'
16+
| 'aura-helios-en'
17+
| 'aura-zeus-en';
18+
19+
export type TTSEncoding = 'linear16' | 'mulaw' | 'alaw' | 'mp3' | 'opus' | 'flac' | 'aac';
20+
521
export type STTModels =
622
| 'nova-general'
723
| 'nova-phonecall'

plugins/deepgram/src/tts.test.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// SPDX-FileCopyrightText: 2024 LiveKit, Inc.
2+
//
3+
// SPDX-License-Identifier: Apache-2.0
4+
import { STT } from '@livekit/agents-plugin-deepgram';
5+
import { tts } from '@livekit/agents-plugins-test';
6+
import { describe } from 'vitest';
7+
import { TTS } from './tts.js';
8+
9+
describe('Deepgram', async () => {
10+
await tts(new TTS(), new STT());
11+
});

0 commit comments

Comments
 (0)