Implement StepFun Realtime service and enhance AssistantConfig
- Add new fields to AssistantConfig for realtime interface configuration, including types, values, and secrets. - Introduce StepFunRealtimeService to handle speech-to-speech processing via WebSocket, integrating STT, LLM, and TTS functionalities. - Refactor pipeline execution to support a new realtime mode, allowing direct text input processing and immediate responses. - Update model resource testing to include validation for StepFun Realtime connections. - Enhance service factory to create realtime services based on configuration settings. - Modify README documentation to reflect new realtime capabilities and usage instructions.
This commit is contained in:
@@ -15,7 +15,6 @@ VALUES
|
||||
('model_004', 'SiliconFlow-CosyVoice2-0.5B', 'TTS', 'openai-tts',
|
||||
'{"modelId":"FunAudioLLM/CosyVoice2-0.5B","apiUrl":"https://api.siliconflow.cn/v1","voice":"FunAudioLLM/CosyVoice2-0.5B:anna","speed":1.0,"sourceSampleRate":24000}',
|
||||
'{"apiKey":"replace-me"}', TRUE, FALSE),
|
||||
'{"apiKey":"replace-me"}', TRUE, FALSE),
|
||||
('model_005', '讯飞语音识别', 'ASR', 'xfyun-asr',
|
||||
'{"apiUrl":"https://iat-api.xfyun.cn/v2/iat","language":"zh_cn","domain":"iat","accent":"mandarin","dynamicCorrection":false,"frameSize":1280}',
|
||||
'{"appId":"replace-me","apiKey":"replace-me","apiSecret":"replace-me"}', TRUE, TRUE),
|
||||
@@ -36,13 +35,9 @@ VALUES
|
||||
'{"apiKey":"replace-me"}', TRUE, FALSE),
|
||||
('model_011', 'text-embedding-3', 'Embedding', 'openai-embedding',
|
||||
'{"modelId":"text-embedding-3-small","apiUrl":"https://api.openai.com/v1/embeddings"}',
|
||||
'{"apiKey":"replace-me"}', TRUE, FALSE),
|
||||
('model_012', 'StepAudio 2.5 Realtime', 'Realtime', 'stepfun-realtime',
|
||||
'{"modelId":"stepaudio-2.5-realtime","apiUrl":"wss://api.stepfun.com/v1/realtime","voice":"linjiajiejie","inputSampleRate":24000,"outputSampleRate":24000,"prefixPaddingMs":500,"silenceDurationMs":300,"energyAwakenessThreshold":2500}',
|
||||
'{"apiKey":"replace-me"}', TRUE, FALSE)
|
||||
ON CONFLICT (id) DO UPDATE SET
|
||||
name = EXCLUDED.name,
|
||||
capability = EXCLUDED.capability,
|
||||
interface_type = EXCLUDED.interface_type,
|
||||
values = EXCLUDED.values,
|
||||
secrets = EXCLUDED.secrets,
|
||||
enabled = EXCLUDED.enabled,
|
||||
is_default = EXCLUDED.is_default,
|
||||
updated_at = now();
|
||||
-- Seed defaults must never overwrite resources configured through the UI.
|
||||
ON CONFLICT (id) DO NOTHING;
|
||||
|
||||
Reference in New Issue
Block a user