Skip to content

Commit 6f7bd6b

Browse files
fix: Check for None type custom dict (#106)
fix: Check for None type custom dict
1 parent 6d24b56 commit 6f7bd6b

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

riva/client/tts.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,11 @@
1212
import wave
1313

1414
def add_custom_dictionary_to_config(req, custom_dictionary):
15-
result_list = [f"{key} {value}" for key, value in custom_dictionary.items()]
16-
result_string = ','.join(result_list)
17-
req.custom_dictionary = result_string
15+
if custom_dictionary is not None:
16+
result_list = [f"{key} {value}" for key, value in custom_dictionary.items()]
17+
if result_list:
18+
result_string = ','.join(result_list)
19+
req.custom_dictionary = result_string
1820

1921
class SpeechSynthesisService:
2022
"""

0 commit comments

Comments
 (0)