AttributeError on custom_dictionary in tts.synthesize() since version 2.17
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 35/100
Hướng nghiên cứu
Bắt đầu với riva/client/tts.py, đặc biệt là synthesize() và add_custom_dictionary_to_config(), sử dụng traceback và request bỏ qua custom_dictionary. Tái hiện lỗi với tts.synthesize() và xác minh rằng lời gọi thành công mà không cần workaround truyền custom_dictionary={}.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
``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!
- Ngôn ngữ chính
- Python
- Star
- 142
- Fork
- 52
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của nvidia-riva/python-clients
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
nvidia-riva/python-clients#172 · 4 bình luận ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
nvidia-riva/python-clients#145 · 1 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
nvidia-riva/python-clients#110 ·
-
Connection_RefuseĐang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 15/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
nvidia-riva/python-clients#93 · 1 reaction ·
Tất cả issue của nvidia-riva/python-clients
Issue tương tự
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
MystenLabs/MemWal#1163 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
infertopics leaves new nodes without a topic when untopiced neighbours outnumber topiced onesCó thể đã có người làm @moneebullah25 đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
FinanceFlash/unvibecode#218 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
NVIDIA/earth2studio#1241 ·
Maintainer thường phản hồi trong vòng 3 ngày