adhearsion / ruby_speech

A ruby library for TTS & ASR document preparation
MIT License
101 stars 41 forks source link

[BUGFIX] Fix handling of millisecond values (#48) #49

Closed chewi closed 6 years ago

chewi commented 6 years ago

When trying an SSML Break time of 0.5 under Adhearsion, FreeSWITCH treats this as 0 seconds. This makes some sense as the spec does not say that you can pass fractional seconds, only whole seconds or milliseconds with the appropriate suffix.

This change adds the appropriate suffix when rendering XML and converts back to seconds again when reading XML.

coveralls commented 6 years ago

Coverage Status

Coverage increased (+0.005%) to 99.093% when pulling e88c85f0cf7a41fe5cbfbdf9f96cae2ae48b49b7 on bugfix/milliseconds into b8d080c136344420634e3243d90f5cdd42bb6d59 on develop.

coveralls commented 6 years ago

Coverage Status

Coverage increased (+0.005%) to 99.093% when pulling e88c85f0cf7a41fe5cbfbdf9f96cae2ae48b49b7 on bugfix/milliseconds into b8d080c136344420634e3243d90f5cdd42bb6d59 on develop.

coveralls commented 6 years ago

Coverage Status

Coverage increased (+0.005%) to 99.093% when pulling e88c85f0cf7a41fe5cbfbdf9f96cae2ae48b49b7 on bugfix/milliseconds into b8d080c136344420634e3243d90f5cdd42bb6d59 on develop.

coveralls commented 6 years ago

Coverage Status

Coverage increased (+0.008%) to 99.093% when pulling b319b70aa45d3196203cc0c72ee82e32fd2d9c68 on bugfix/milliseconds into 77ffd0e78a598859f4b0cf5794a586ffa84374e9 on develop.

coveralls commented 6 years ago

Coverage Status

Coverage increased (+0.008%) to 99.093% when pulling b319b70aa45d3196203cc0c72ee82e32fd2d9c68 on bugfix/milliseconds into 77ffd0e78a598859f4b0cf5794a586ffa84374e9 on develop.

coveralls commented 6 years ago

Coverage Status

Coverage increased (+0.008%) to 99.093% when pulling b319b70aa45d3196203cc0c72ee82e32fd2d9c68 on bugfix/milliseconds into 77ffd0e78a598859f4b0cf5794a586ffa84374e9 on develop.

chewi commented 6 years ago

Guys, any chance we could cut a new release with this fix? We need it in production but we're using JRuby and perhaps I'm being stupid but when installing from git, Bundler always gets the platform wrong. It either doesn't build native extensions at all or tries to build the C versions.

sfgeorge commented 6 years ago

I'm totally in favor 👍

FYI, if it helps, the only way I've successfully deployed a ruby_speech fork is by forcefully adding lib/ruby_speech/ruby_speech.jar to source control after a rake run. That tends to do it. But I don't see any reason not to cut a new release.

That reminds me (oops) can you add an entry related to this ms fix to the CHANGELOG.md?

chewi commented 6 years ago

@benlangfeld, @bklang, the boss is asking where this fix is. I would push a new release myself if I could but I guess only you guys can? Pretty please?

lpradovera commented 6 years ago

LGTM but I do not have release privileges on this one.

benlangfeld commented 6 years ago

I’ll push a release when I get back to my computer in a few hours. I’ll also give you both access to do so.

chewi commented 6 years ago

Awesome, thanks very much. I'll be putting it into action on Monday.

benlangfeld commented 6 years ago

https://rubygems.org/gems/ruby_speech/versions/2.4.0 https://rubygems.org/gems/ruby_speech/versions/2.4.0-java

You both have release permission; for punchblock and adhearsion also.