Skip to content

Commit

Permalink
fix: Check for None type custom dict (#106)
Browse files Browse the repository at this point in the history
fix: Check for None type custom dict
  • Loading branch information
mohnishparmar authored Nov 29, 2024
1 parent 6d24b56 commit 6f7bd6b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions riva/client/tts.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@
import wave

def add_custom_dictionary_to_config(req, custom_dictionary):
result_list = [f"{key} {value}" for key, value in custom_dictionary.items()]
result_string = ','.join(result_list)
req.custom_dictionary = result_string
if custom_dictionary is not None:
result_list = [f"{key} {value}" for key, value in custom_dictionary.items()]
if result_list:
result_string = ','.join(result_list)
req.custom_dictionary = result_string

class SpeechSynthesisService:
"""
Expand Down

0 comments on commit 6f7bd6b

Please sign in to comment.