Skip to content

Commit

Permalink
* adapting code with TEN
Browse files Browse the repository at this point in the history
* pass transcribe and polly init param when invoking start api;
* update transcribe_asr graph to display chat in playground;
* other code improvements.
  • Loading branch information
Chen188 committed Aug 27, 2024
1 parent a28d58c commit 3b0394e
Show file tree
Hide file tree
Showing 10 changed files with 410 additions and 90 deletions.
108 changes: 103 additions & 5 deletions agents/property.json
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@
"region": "us-east-1",
"access_key": "$AWS_ACCESS_KEY_ID",
"secret_key": "$AWS_SECRET_ACCESS_KEY",
"model": "anthropic.claude-3-5-sonnet-20240620-v1:0",
"model": "$AWS_BEDROCK_MODEL",
"max_tokens": 512,
"prompt": "",
"greeting": "ASTRA agent connected. How can i help you today?",
Expand Down Expand Up @@ -1008,7 +1008,7 @@
"region": "us-east-1",
"access_key": "$AWS_ACCESS_KEY_ID",
"secret_key": "$AWS_SECRET_ACCESS_KEY",
"model": "anthropic.claude-3-5-sonnet-20240620-v1:0",
"model": "$AWS_BEDROCK_MODEL",
"max_tokens": 512,
"prompt": "",
"greeting": "ASTRA agent connected. How can i help you today?",
Expand Down Expand Up @@ -1036,6 +1036,12 @@
"addon": "interrupt_detector_python",
"name": "interrupt_detector"
},
{
"type": "extension",
"extension_group": "transcriber",
"addon": "message_collector",
"name": "message_collector"
},
{
"type": "extension_group",
"addon": "default_extension_group",
Expand Down Expand Up @@ -1067,6 +1073,10 @@
{
"extension_group": "bedrock",
"extension": "bedrock_llm"
},
{
"extension_group": "transcriber",
"extension": "message_collector"
}
]
}
Expand All @@ -1082,6 +1092,30 @@
{
"extension_group": "tts",
"extension": "polly_tts"
},
{
"extension_group": "transcriber",
"extension": "message_collector",
"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)"
}
]
}
}
]
}
]
}
Expand Down Expand Up @@ -1124,6 +1158,21 @@
}
]
},
{
"extension_group": "transcriber",
"extension": "message_collector",
"data": [
{
"name": "data",
"dest": [
{
"extension_group": "default",
"extension": "agora_rtc"
}
]
}
]
},
{
"extension_group": "default",
"extension": "interrupt_detector",
Expand Down Expand Up @@ -1158,7 +1207,7 @@
"remote_stream_id": 123,
"subscribe_audio": true,
"publish_audio": true,
"publish_data": false,
"publish_data": true,
"enable_agora_asr": false,
"agora_asr_vendor_name": "microsoft",
"agora_asr_language": "en-US",
Expand Down Expand Up @@ -1189,7 +1238,7 @@
"region": "us-east-1",
"access_key": "$AWS_ACCESS_KEY_ID",
"secret_key": "$AWS_SECRET_ACCESS_KEY",
"model": "anthropic.claude-3-5-sonnet-20240620-v1:0",
"model": "$AWS_BEDROCK_MODEL",
"max_tokens": 512,
"prompt": "",
"greeting": "ASTRA agent connected. How can i help you today?",
Expand Down Expand Up @@ -1217,6 +1266,12 @@
"addon": "interrupt_detector_python",
"name": "interrupt_detector"
},
{
"type": "extension",
"extension_group": "transcriber",
"addon": "message_collector",
"name": "message_collector"
},
{
"type": "extension_group",
"addon": "default_extension_group",
Expand Down Expand Up @@ -1297,6 +1352,10 @@
{
"extension_group": "bedrock",
"extension": "bedrock_llm"
},
{
"extension_group": "transcriber",
"extension": "message_collector"
}
]
}
Expand All @@ -1312,6 +1371,30 @@
{
"extension_group": "tts",
"extension": "polly_tts"
},
{
"extension_group": "transcriber",
"extension": "message_collector",
"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)"
}
]
}
}
]
}
]
}
Expand Down Expand Up @@ -1354,6 +1437,21 @@
}
]
},
{
"extension_group": "transcriber",
"extension": "message_collector",
"data": [
{
"name": "data",
"dest": [
{
"extension_group": "default",
"extension": "agora_rtc"
}
]
}
]
},
{
"extension_group": "default",
"extension": "interrupt_detector",
Expand Down Expand Up @@ -2375,4 +2473,4 @@
}
]
}
}
}
Loading

0 comments on commit 3b0394e

Please sign in to comment.