ros-drivers / audio_common

Common code for working with audio in ROS
BSD 3-Clause "New" or "Revised" License
86 stars 152 forks source link

festival_plugin: add support for different encodings #249

Closed peci1 closed 6 months ago

peci1 commented 6 months ago

Needed for e.g. festival-czech, which expects source text in ISO-8859-2.

The implementation tries to be as unintrusive as possible. No previous use-cases should be broken (except for voices with : in their name, but I don't think there are any).

To test:

sudo apt install festival-czech
rosrun sound_play soundplay_node.py &
rostopic pub -1 /robotsound sound_play/SoundRequest "{sound: -3, command: 1, volume: 1.0, arg: 'Ahoj lidi a roboti, jak se máte? Testujeme háčky a čárky', arg2: 'voice_czech_ph:ISO-8859-2'}"

Without the correct encoding, you hear "neznámý" several times instead of the diacritics: https://translate.google.com/?sl=cs&tl=en&text=nezn%C3%A1m%C3%BD&op=translate .

peci1 commented 6 months ago

Thanks for the quick action!

peci1 commented 1 month ago

@knorth55 do you plan a Noetic release? This feature is still not available in binary releases if I'm not mistaken.

knorth55 commented 1 month ago

@peci1 Oh thanks! I will release the new version!

knorth55 commented 1 month ago

I made a release PR. https://github.com/ros/rosdistro/pull/42432

peci1 commented 1 month ago

Thanks!

knorth55 commented 1 month ago

Now the new version is released: https://github.com/ros/rosdistro/pull/42432