AttributeError on custom_dictionary in tts.synthesize() since version 2.17
还没有人认领这个 Issue。
评估
调研方向
从 riva/client/tts.py 开始,重点查看 synthesize() 和 add_custom_dictionary_to_config(),并使用 traceback 以及省略 custom_dictionary 的请求。使用 tts.synthesize() 重现故障,并验证无需传入 custom_dictionary={} 这一 workaround 时调用也能成功。
由索引模型根据 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 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 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 ·
-
难度 4/5 3-5 天 新手友好度 15/100
-
难度 4/5 3-5 天 新手友好度 25/100
nvidia-riva/python-clients#93 · 1 个 reaction ·
查看 nvidia-riva/python-clients 的全部 Issue
相似的 Issue
-
Questions crashes on a real SQuAD2 no-answer prediction可能已有人在做 @HuaTNA 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
GST is read as Gulf Standard Time (UTC+4) instead of Guam Standard Time (UTC+10)可能已有人在做 @yang00333 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
DOI-USGS/dataretrieval-python#454 ·
维护者通常 4 天内回复
-
area:core-platform effort:S priority:P3 status:in-review type:test
难度 2/5 1 小时以内 新手友好度 80/100
randomparity/kdive#3246 · 1 条评论 ·
维护者通常 1 天内回复
-
Requantification library converts m/z to mass with the hydrogen-atom mass instead of the proton mass未关闭bug
难度 1/5 1 小时以内 新手友好度 85/100
nf-core/metaboigniter#130 ·
维护者通常 1 天内回复
-
netbox status: needs owner type: documentation
难度 1/5 1 小时以内 新手友好度 75/100
netbox-community/netbox#23412 · 1 个 reaction ·
维护者通常 1 天内回复