AttributeError on custom_dictionary in tts.synthesize() since version 2.17
まだ誰も着手していません。
評価
調査の方向性
riva/client/tts.pyから始め、特にsynthesize()とadd_custom_dictionary_to_config()を確認し、tracebackとcustom_dictionaryを省略したリクエストを使用します。tts.synthesize()で失敗を再現し、custom_dictionary={}を渡す回避策なしで呼び出しが成功することを確認します。
索引モデルが issue の本文から書いたものです。
説明
``Since version 2.17, an AttributeError occurs when using the tts.synthesize() method in the riva.client.tts module. It seems that the custom_dictionary parameter is None by default, which causes the function add_custom_dictionary_to_config to fail when attempting to access .items().
/home/rodrigo/Proyectos/marta/Call-Services/venv/bin/python /home/rodrigo/Proyectos/marta/Call-Services/test/performance_test/testNvidiaRivaTTS.py
/home/rodrigo/Proyectos/marta/Call-Services/test/performance_test/testNvidiaRivaTTS.py:16: DeprecationWarning: 'audioop' is deprecated and slated for removal in Python 3.13
import audioop
Traceback (most recent call last):
File "/home/rodrigo/Proyectos/marta/Call-Services/test/performance_test/testNvidiaRivaTTS.py", line 169, in <module>
for transformed_audio in ulaw_response_audio_stream:
File "/home/rodrigo/Proyectos/marta/Call-Services/test/performance_test/testNvidiaRivaTTS.py", line 152, in wav_converter
for raw_wav in raw_stream:
File "/home/rodrigo/Proyectos/marta/Call-Services/test/performance_test/testNvidiaRivaTTS.py", line 130, in generate_audio
resp = tts_service.synthesize(**req)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/rodrigo/Proyectos/marta/Call-Services/venv/lib/python3.11/site-packages/riva/client/tts.py", line 91, in synthesize
add_custom_dictionary_to_config(req, custom_dictionary)
File "/home/rodrigo/Proyectos/marta/Call-Services/venv/lib/python3.11/site-packages/riva/client/tts.py", line 15, in add_custom_dictionary_to_config
result_list = [f"{key} {value}" for key, value in custom_dictionary.items()]
^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'items'
As a temporary workaround, the issue can be avoided by passing an empty dictionary as custom_dictionary={} in the request.
Please take more care with releases to avoid breaking changes like this in the future.
Thank you!
- 主要言語
- Python
- スター
- 142
- フォーク
- 52
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
nvidia-riva/python-clients のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
nvidia-riva/python-clients#172 · コメント 4 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
nvidia-riva/python-clients#145 · コメント 1 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
nvidia-riva/python-clients#110 ·
-
Connection_Refuseオープン
難易度 4/5 3〜5日 初心者へのやさしさ 15/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
nvidia-riva/python-clients#93 · リアクション 1 件 ·
nvidia-riva/python-clients の issue をすべて見る
似ている issue
-
[Bug]: `graphify export svg` writes a graph.svg that is not well-formed XML when a label contains a control character対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
Graphify-Labs/graphify#4241 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
-
DeviceTrackerオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 63/100
XiaoMi/ha_xiaomi_home#1821 ·
メンテナーはふだん 1 日以内に返信
-
Maven path-index: "Ambiguous or noncanonical artifact path" error does not report the offending pathオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
pulp/pulp_maven#524 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信