Skip to content

Commit 82e184a

Browse files
committed
Add voice value extraction for logging in clients
Added logic to extract the voice value for logging in both AsyncTTSClient and TTSClient. Also updated .flake8 to ignore E501 (line too long) errors.
1 parent 37215f0 commit 82e184a

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

.flake8

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
[flake8]
22
max-line-length = 100
3-
extend-ignore = E203,W503
3+
extend-ignore = E203,W503,E501
44
exclude = .venv,build,dist,ttsfm.egg-info

ttsfm/async_client.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -563,6 +563,9 @@ async def _process_openai_fm_response(
563563
actual_format.value,
564564
)
565565

566+
# Get voice value for logging
567+
voice_value = request.voice.value if hasattr(request.voice, 'value') else str(request.voice)
568+
566569
# Create response object
567570
tts_response = TTSResponse(
568571
audio_data=audio_data,

ttsfm/client.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -572,6 +572,9 @@ def _process_openai_fm_response(
572572
actual_format.value,
573573
)
574574

575+
# Get voice value for logging
576+
voice_value = request.voice.value if hasattr(request.voice, 'value') else str(request.voice)
577+
575578
# Create response object
576579
tts_response = TTSResponse(
577580
audio_data=audio_data,

0 commit comments

Comments
 (0)