-
Notifications
You must be signed in to change notification settings - Fork 408
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
support different TTS providers based on language selected (#72)
* feat: add max_memory_length configuration option for OpenAI ChatGPT extension * chore: support different TTS providers based on language selected * fix(): fix default value * chore: update Dockerfile and Makefile for improved build process * fix(): remove GOPROXY * chore: remove sensitive logs * chore(): rename tts
- Loading branch information
1 parent
b8e2db7
commit 6e5ee51
Showing
11 changed files
with
384 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,6 +38,9 @@ | |
}, | ||
"greeting": { | ||
"type": "string" | ||
}, | ||
"max_memory_length": { | ||
"type": "int64" | ||
} | ||
}, | ||
"data_in": [ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,265 @@ | ||
{ | ||
"type": "app", | ||
"name": "astra_agents", | ||
"version": "0.1.0", | ||
"language": "go", | ||
"dependencies": [ | ||
{ | ||
"type": "extension_group", | ||
"name": "default_extension_group", | ||
"version": "0.1.0" | ||
}, | ||
{ | ||
"type": "extension", | ||
"name": "agora_rtc", | ||
"version": "0.1.1" | ||
}, | ||
{ | ||
"type": "extension", | ||
"name": "chat_transcriber", | ||
"version": "0.1.0" | ||
}, | ||
{ | ||
"type": "extension", | ||
"name": "elevenlabs_tts", | ||
"version": "0.1.0" | ||
}, | ||
{ | ||
"type": "extension", | ||
"name": "interrupt_detector", | ||
"version": "0.1.0" | ||
}, | ||
{ | ||
"type": "extension", | ||
"name": "openai_chatgpt", | ||
"version": "0.1.0" | ||
} | ||
], | ||
"predefined_graphs": [ | ||
{ | ||
"name": "astra_agents", | ||
"auto_start": true, | ||
"nodes": [ | ||
{ | ||
"type": "extension", | ||
"extension_group": "default", | ||
"addon": "agora_rtc", | ||
"name": "agora_rtc", | ||
"property": { | ||
"app_id": "<agora_appid>", | ||
"token": "<agora_token>", | ||
"channel": "astra_agents_test", | ||
"stream_id": 1234, | ||
"remote_stream_id": 123, | ||
"subscribe_audio": true, | ||
"publish_audio": true, | ||
"publish_data": true, | ||
"enable_agora_asr": true, | ||
"agora_asr_vendor_name": "microsoft", | ||
"agora_asr_language": "en-US", | ||
"agora_asr_vendor_key": "<azure_stt_key>", | ||
"agora_asr_vendor_region": "<azure_stt_region>", | ||
"agora_asr_session_control_file_path": "session_control.conf" | ||
} | ||
}, | ||
{ | ||
"type": "extension", | ||
"extension_group": "default", | ||
"addon": "interrupt_detector", | ||
"name": "interrupt_detector" | ||
}, | ||
{ | ||
"type": "extension", | ||
"extension_group": "chatgpt", | ||
"addon": "openai_chatgpt", | ||
"name": "openai_chatgpt", | ||
"property": { | ||
"base_url": "", | ||
"api_key": "<openai_api_key>", | ||
"frequency_penalty": 0.9, | ||
"model": "gpt-3.5-turbo", | ||
"max_tokens": 512, | ||
"prompt": "", | ||
"proxy_url": "", | ||
"greeting": "ASTRA agent connected. How can i help you today?", | ||
"max_memory_length": 10 | ||
} | ||
}, | ||
{ | ||
"type": "extension", | ||
"extension_group": "tts", | ||
"addon": "elevenlabs_tts", | ||
"name": "elevenlabs_tts", | ||
"property": { | ||
"api_key": "<elevenlabs_tts_key>", | ||
"model_id": "eleven_multilingual_v2", | ||
"optimize_streaming_latency": 0, | ||
"request_timeout_seconds": 30, | ||
"similarity_boost": 0.75, | ||
"speaker_boost": false, | ||
"stability": 0.5, | ||
"style": 0.0, | ||
"voice_id": "pNInz6obpgDQGcFmaJgB" | ||
} | ||
}, | ||
{ | ||
"type": "extension", | ||
"extension_group": "transcriber", | ||
"addon": "chat_transcriber", | ||
"name": "chat_transcriber" | ||
}, | ||
{ | ||
"type": "extension_group", | ||
"addon": "default_extension_group", | ||
"name": "default" | ||
}, | ||
{ | ||
"type": "extension_group", | ||
"addon": "default_extension_group", | ||
"name": "chatgpt" | ||
}, | ||
{ | ||
"type": "extension_group", | ||
"addon": "default_extension_group", | ||
"name": "tts" | ||
}, | ||
{ | ||
"type": "extension_group", | ||
"addon": "default_extension_group", | ||
"name": "transcriber" | ||
} | ||
], | ||
"connections": [ | ||
{ | ||
"extension_group": "default", | ||
"extension": "agora_rtc", | ||
"data": [ | ||
{ | ||
"name": "text_data", | ||
"dest": [ | ||
{ | ||
"extension_group": "default", | ||
"extension": "interrupt_detector" | ||
}, | ||
{ | ||
"extension_group": "chatgpt", | ||
"extension": "openai_chatgpt" | ||
}, | ||
{ | ||
"extension_group": "transcriber", | ||
"extension": "chat_transcriber" | ||
} | ||
] | ||
} | ||
] | ||
}, | ||
{ | ||
"extension_group": "chatgpt", | ||
"extension": "openai_chatgpt", | ||
"data": [ | ||
{ | ||
"name": "text_data", | ||
"dest": [ | ||
{ | ||
"extension_group": "tts", | ||
"extension": "elevenlabs_tts" | ||
}, | ||
{ | ||
"extension_group": "transcriber", | ||
"extension": "chat_transcriber", | ||
"cmd_conversions": [ | ||
{ | ||
"cmd": { | ||
"type": "per_property", | ||
"keep_original": true, | ||
"rules": [ | ||
{ | ||
"path": "is_final", | ||
"type": "fixed_value", | ||
"value": "bool(true)" | ||
}, | ||
{ | ||
"path": "stream_id", | ||
"type": "fixed_value", | ||
"value": "uint32(999)" | ||
} | ||
] | ||
} | ||
} | ||
] | ||
} | ||
] | ||
} | ||
], | ||
"cmd": [ | ||
{ | ||
"name": "flush", | ||
"dest": [ | ||
{ | ||
"extension_group": "tts", | ||
"extension": "elevenlabs_tts" | ||
} | ||
] | ||
} | ||
] | ||
}, | ||
{ | ||
"extension_group": "tts", | ||
"extension": "elevenlabs_tts", | ||
"pcm_frame": [ | ||
{ | ||
"name": "pcm_frame", | ||
"dest": [ | ||
{ | ||
"extension_group": "default", | ||
"extension": "agora_rtc" | ||
} | ||
] | ||
} | ||
], | ||
"cmd": [ | ||
{ | ||
"name": "flush", | ||
"dest": [ | ||
{ | ||
"extension_group": "default", | ||
"extension": "agora_rtc" | ||
} | ||
] | ||
} | ||
] | ||
}, | ||
{ | ||
"extension_group": "transcriber", | ||
"extension": "chat_transcriber", | ||
"data": [ | ||
{ | ||
"name": "data", | ||
"dest": [ | ||
{ | ||
"extension_group": "default", | ||
"extension": "agora_rtc" | ||
} | ||
] | ||
} | ||
] | ||
}, | ||
{ | ||
"extension_group": "default", | ||
"extension": "interrupt_detector", | ||
"cmd": [ | ||
{ | ||
"name": "flush", | ||
"dest": [ | ||
{ | ||
"extension_group": "chatgpt", | ||
"extension": "openai_chatgpt" | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] | ||
} |
Oops, something went wrong.