feat(clients): audio: ElevenLabs, AssemblyAI, Deepgram, Cartesia, Speechmatics, Hume
Table driven REST (509 rows verified against vendor specs by tools/check_spec.py), WebSockets over the src/google/live client, neutral SpeechSynthesizer / SpeechRecognizer seam, /ai/audio demo with dry runs, 110 package tests and 5 route tests. PlayHT has no public API; LeMUR is gone from AssemblyAI's spec. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Vendored
+50
@@ -0,0 +1,50 @@
|
||||
#include "vendors/audio/providers.h"
|
||||
|
||||
#include "vendors/audio/assemblyai/calls.h"
|
||||
#include "vendors/audio/cartesia/calls.h"
|
||||
#include "vendors/audio/deepgram/calls.h"
|
||||
#include "vendors/audio/elevenlabs/calls.h"
|
||||
#include "vendors/audio/hume/calls.h"
|
||||
#include "vendors/audio/speechmatics/calls.h"
|
||||
|
||||
namespace molo::audio {
|
||||
|
||||
const std::vector<ProviderInfo>& Providers::all() {
|
||||
static const std::vector<ProviderInfo> v = {
|
||||
{"elevenlabs", "ElevenLabs", "ELEVENLABS_API_KEY", "", "https://elevenlabs.io/app/settings/api-keys", true, true,
|
||||
"tts-stream-input,stt-realtime,convai-conversation", &elevenlabs::calls},
|
||||
{"assemblyai", "AssemblyAI", "ASSEMBLYAI_API_KEY", "", "https://www.assemblyai.com/dashboard/api-keys", false, true,
|
||||
"streaming-v3", &assemblyai::calls},
|
||||
{"deepgram", "Deepgram", "DEEPGRAM_API_KEY", "", "https://console.deepgram.com", true, true,
|
||||
"listen-v1,listen-v2,speak-v1,speak-v2,agent-converse", &deepgram::calls},
|
||||
{"cartesia", "Cartesia", "CARTESIA_API_KEY", "", "https://play.cartesia.ai/keys", true, true,
|
||||
"tts-websocket,stt-turns-websocket,stt-websocket", &cartesia::calls},
|
||||
{"speechmatics", "Speechmatics", "SPEECHMATICS_API_KEY", "SPEECHMATICS_MANAGEMENT_TOKEN",
|
||||
"https://portal.speechmatics.com/settings/api-keys/", true, true, "realtime-v2", &speechmatics::calls},
|
||||
{"hume", "Hume", "HUME_API_KEY", "", "https://app.hume.ai/keys", true, false, "tts-stream-input,evi-chat",
|
||||
&hume::calls},
|
||||
};
|
||||
return v;
|
||||
}
|
||||
|
||||
const ProviderInfo* Providers::find(const std::string& name) {
|
||||
for (const ProviderInfo& p : all())
|
||||
if (name == p.name) return &p;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
std::size_t Providers::call_count() {
|
||||
std::size_t n = 0;
|
||||
for (const ProviderInfo& p : all()) n += p.table().size();
|
||||
return n;
|
||||
}
|
||||
|
||||
const std::vector<Providers::Absent>& Providers::absent() {
|
||||
static const std::vector<Absent> v = {
|
||||
{"playht",
|
||||
"PlayHT's API hosts do not resolve (api.play.ht and api.play.ai, 2026-10-25): no public API to wrap, none invented"},
|
||||
};
|
||||
return v;
|
||||
}
|
||||
|
||||
} // namespace molo::audio
|
||||
Reference in New Issue
Block a user