mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-01-28 21:26:13 +01:00
🌊 feat: enhance TTSService with Deepgram SDK integration and refactor voice validation
This commit is contained in:
parent
5eabd2493c
commit
b7f4903acd
3 changed files with 123 additions and 33 deletions
|
|
@ -199,7 +199,7 @@ class STTService {
|
|||
topics: sttSchema.intelligence?.topics,
|
||||
};
|
||||
|
||||
[configOptions].forEach(this.removeUndefined);
|
||||
this.removeUndefined(configOptions);
|
||||
|
||||
const { result, error } = await deepgram.listen.prerecorded.transcribeFile(
|
||||
audioReadStream,
|
||||
|
|
@ -213,6 +213,7 @@ class STTService {
|
|||
return result.results?.channels[0]?.alternatives[0]?.transcript || '';
|
||||
}
|
||||
|
||||
// TODO: Implement a better way to determine if the SDK should be used
|
||||
shouldUseSDK(provider, sttSchema) {
|
||||
if (provider !== STTProviders.OPENAI && provider !== STTProviders.AZURE_OPENAI) {
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue