From 71e107725cbe29cd77857572e6123a74b6f454d6 Mon Sep 17 00:00:00 2001
From: Mark Backman <mark@daily.co>
Date: Fri, 10 Jan 2025 19:32:18 -0500
Subject: [PATCH] Add optional aws_session_token for PollyTTSService

---
 CHANGELOG.md                | 2 ++
 src/pipecat/services/aws.py | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 932ccd8b1..1ad18922f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -30,6 +30,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
 
 ### Changed
 
+- Added `aws_session_token` to the `PollyTTSService`.
+
 - Changed the default model for `PlayHTHttpTTSService` to `Play3.0-mini-http`.
 
 - api_key, aws_access_key_id and region are no longer required parameters for the PollyTTSService (AWSTTSService)
diff --git a/src/pipecat/services/aws.py b/src/pipecat/services/aws.py
index a4ec6622b..9f9b2a3ed 100644
--- a/src/pipecat/services/aws.py
+++ b/src/pipecat/services/aws.py
@@ -121,6 +121,7 @@ def __init__(
         *,
         api_key: Optional[str] = None,
         aws_access_key_id: Optional[str] = None,
+        aws_session_token: Optional[str] = None,
         region: Optional[str] = None,
         voice_id: str = "Joanna",
         sample_rate: int = 24000,
@@ -133,6 +134,7 @@ def __init__(
             "polly",
             aws_access_key_id=aws_access_key_id,
             aws_secret_access_key=api_key,
+            aws_session_token=aws_session_token,
             region_name=region,
         )
         self._settings = {