Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

AttributeError on custom_dictionary in tts.synthesize() since version 2.17

Đang mở
#100 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

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
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
python
Lĩnh vực
api

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

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của nvidia-riva/python-clients

Tất cả issue của nvidia-riva/python-clients

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.