如何在“语音调度器"中使用索引标记? [英] How to use Index Marks in "speech-dispatcher"?

查看:16
本文介绍了如何在“语音调度器"中使用索引标记?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以,问题类似于主题:如何在语音调度器中使用索引标记?"我听到了很多关于它的信息,但找不到任何关于如何在 SPD_MODE_THREADED 中使用它的教程.主要问题是当您发送SPEAK"命令时,您无法将数据模式更改为 SPD_DATA_SSML.而且我觉得我做错了什么.所以,谁知道如何使用这个索引标记,教程也很容易接受.谢谢!

So, question like in theme: "How to use Index Marks in speech-dispatcher?" I hear many about it but can't find any tutorial with how to use it in SPD_MODE_THREADED. The main problem is when you send "SPEAK" command, you can't change data mode to SPD_DATA_SSML. And I think I doing something wrong. So, who knows how to use this Index Marks, tutorials is very acceptable too. Thank you!

推荐答案

已解决,这是在speech-dispatcher中设置索引标记的方法:

Solved, this is the way to set index marks in speech-dispatcher:

pthread_mutex_lock( m_connection->ssip_mutex );

spd_execute_command_wo_mutex( m_connection, "SET SELF SSML_MODE on" );

spd_execute_command_wo_mutex( m_connection, "SPEAK" );

char * reply = spd_send_data_wo_mutex( m_connection, "<speak>Hello, <mark name=\"mark1\"/> how does it work?</speak>", SPD_NO_REPLY );
delete[] reply;

spd_execute_command_wo_mutex( m_connection, "\r\n." );

spd_execute_command_wo_mutex( m_connection, "SET SELF SSML_MODE off" );

pthread_mutex_unlock( m_connection->ssip_mutex );

其中 是索引标记.而 mark1 是索引标记名称.

Where <mark name=\"mark1\"/> is index mark. And mark1 is index mark name.

这个文档对于低级别的语音调度器通信非常有用:http://cvs.freebsoft.org/doc/speechd/ssip.html#Top

This docs is very useful for low level speech-dispatcher communication: http://cvs.freebsoft.org/doc/speechd/ssip.html#Top

这篇关于如何在“语音调度器"中使用索引标记?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆