Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adhearsion crashes on sending cyrillic to FreeSWITCH #290

Closed
utgarda opened this issue Apr 23, 2013 · 4 comments
Closed

Adhearsion crashes on sending cyrillic to FreeSWITCH #290

utgarda opened this issue Apr 23, 2013 · 4 comments
Labels
Milestone

Comments

@utgarda
Copy link

utgarda commented Apr 23, 2013

Hello! Trying to get Adhearsion working with FreeSWITCH and Russian TTS on flite. FS is built with flite, en & ru.

adhearsion.rb :

# encoding: utf-8
...
  config.punchblock.platform = :freeswitch
  config.punchblock.password = "ClueCon"
  config.punchblock.host = "127.0.0.1"
  config.punchblock.media_engine = :flite
...

FreeSWITCH output:

> freeswitch -version                                                                                                                                                                                
FreeSWITCH version: 1.5.1b+git~20130404T030057Z~0b4340c36e (git 0b4340c 2013-04-04 03:00:57Z)

> freeswitch
...
2013-04-23 18:55:52.910877 [NOTICE] mod_dptools.c:1205 Channel [sofia/internal/[email protected]] has been answered
#crashes after trying to send cyrillic text from Adhearsion
freeswitch: src/switch_buffer.c:247: switch_buffer_write: Assertion `buffer->data != ((void *)0)' failed.                                                                                                                                    
Aborted (core dumped)

My default terminal encoding is UTF8, just checking before starting ahn:

> echo $LANG
en_US.UTF-8
> export LC_CTYPE=$LANG
> ahn1.9 start
AHN> take
[2013-04-23 18:55:56] DEBUG Adhearsion::Call: e4c0eee2-ac25-11e2-bd1f-5132b6f81bb3: Starting interactive controller
AHN<e4c0eee2-ac25-11e2-bd1f-5132b6f81bb3> say 'hi'
...
AHN<e4c0eee2-ac25-11e2-bd1f-5132b6f81bb3> [2013-04-23 18:57:15] DEBUG Adhearsion::Call: e4c0eee2-ac25-11e2-bd1f-5132b6f81bb3: Executing command #<Punchblock::Component::Output target_call_id=nil, component_id=nil, target_mixer_name=nil, state_name=:new, voice=nil, ssml=<speak xmlns="http://www.w3.org/2001/10/synthesis" version="1.0" xml:lang="en-US">hi</speak>, interrupt_on=nil, start_offset=nil, start_paused=false, repeat_interval=nil, repeat_times=nil, max_time=nil, renderer=nil>

# trying to switch to cyrillic

AHN<e4c0eee2-ac25-11e2-bd1f-5132b6f81bb3> say "фйъюячцщш"
[2013-04-23 19:02:30] DEBUG Adhearsion::Call: e4c0eee2-ac25-11e2-bd1f-5132b6f81bb3: Executing command #<Punchblock::Component::Output target_call_id=nil, component_id=nil, target_mixer_name=nil, state_name=:new, voice=nil, ssml=<speak xmlns="http://www.w3.org/2001/10/synthesis" version="1.0" xml:lang="en-US">&#x444;&#x44C;&#x44E;&#x44F;&#x447;&#x446;&#x448;&#x449;</speak>, interrupt_on=nil, start_offset=nil, start_paused=false, repeat_interval=nil, repeat_times=nil, max_time=nil, renderer=nil>
[2013-04-23 19:02:30] ERROR Celluloid: RubyFS::Stream crashed!
Encoding::InvalidByteSequenceError: "\xD1" on US-ASCII
/usr/lib64/ruby/gems/1.9.1/gems/json-1.7.6/lib/json/common.rb:155:in `encode'
...

Same thing for non-interactive controllers.
Full log: http://pastebin.com/UcNzg5AQ

@benlangfeld
Copy link
Member

I'm digging into this a little hoping for a fix, but in the meantime you should update your gems (bundle update) since you're behind on a few (RubyFS and Celluloid for sure).

@benlangfeld
Copy link
Member

This is pending getting the RubyFS specs passing again (they appear to be timing out due to some dependency update) and a test case on RubyFS (a pull request for which would be awesome) for this specific issue.

@benlangfeld
Copy link
Member

RubyFS test suite should be passing again now, so the next step is a failing test case for non-ASCII commands/responses.

@benlangfeld
Copy link
Member

Closing in favour of adhearsion/punchblock#201

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants