zoukankan      html  css  js  c++  java
  • NSSTTS通用API

    NSSTTS通用API

    Jump to: navigation, search

    CS001033


    设备, 软件 版本:

    S60 3rd Edition, FP2


    详细描述

    这个API不是公开API的一部分,可以在SDK API Plug-in找到。


    这里TTS通用接口API定义了TTS所需要的通用数据类型。这个类型涵盖了文本数据分段及语音风格。TTS通用模块需要使用在TTS客户端应用中。


    头文件

    #include <nssttscommon.h>


    链接库

    LIBRARY         nssttscommon.lib


    示例代码

    TTS的风格信息

    这个属性可以用来设置合成的语言,朗读者的年龄等

    TTtsStyle               iStyle;
    TTtsStyleID iStyleId;
    // Use high quality TTS
    iStyle.iQuality = ETtsQualityHighOnly;
    // Use language and speaker set in Speech application.
    // Also speaking rate and volume is set according to Speech app.
    iStyle.iLanguage = KTtsUndefinedLanguage;
    // Add style
    iStyleId = iTtsUtility->AddStyleL( iStyle );// where iTtsutility is CTtsUtility


    文本的分段信息

    这个类记录了分段信息

    TTtsSegment             iSegment;
    iSegment.SetStyleID( iStyleId ); // Sets the style for a segment.
    //The style cannot be deleted during the lifetime of this object.
    iSegment.SetTextPtr( iParsedText->Text() );//Sets a text pointer.
    //The text cannot be deleted during the lifetime of this object.


    CTtsParsedText

    这里CTtsParsedText类记录了TTS的分解文本。这个类拥有文本和相关的音素序列(用以模式识别),以及分段信息


    增加段落

    增加或插入一个新的段落。段落必须要增加到正确的位置。即文本和音素序列要互相跟随。可以在该函数返回后删除此段落

    CTtsParsedText* iParsedText = CTtsParsedText::NewL();
    // Set text
    iParsedText->SetTextL( KText1 );
    iParsedText->AddSegmentL( iSegment, 0 );


    删除段落和段落数目

    if ( iParsedText->NumberOfSegments() > 0 )
    {
    // Remove existing segment from parsed text structure
    iParsedText->DeleteSegmentL( 0 );
    }

    Comments

    (no comments yet)

  • 相关阅读:
    layer弹出层显示在top顶层
    PC上安装多个操作系统
    Windows下DLL查找顺序
    AHCI驱动安装
    Office 多版本共存
    Windows定时器
    Windows菜单
    Windows高精度时间
    VB6.0调用DLL
    时间服务器通讯协议
  • 原文地址:https://www.cnblogs.com/zziss/p/2143684.html
Copyright © 2011-2022 走看看