General NSSTTS APIs

Source: Internet
Author: User
General NSSTTS APIs

Jump to: navigation, search

CS001033

Device, software version:

S60 3rd Edition, FP2

Detailed description

This API is not part of the public API, which can be found in sdk api Plug-in.

Here, TTS APIs define the common data types required by TTS. This type covers text data segmentation and Speech Style. The TTS common module must be used in the TTS client application.

Header file
#include <nssttscommon.h>

Link Library
LIBRARY         nssttscommon.lib

Sample Code

TTS style information

This attribute can be used to set the synthesis language, the reader's age, and so on.

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

Text Segmentation Information

This class records segment information

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

Here, the CTtsParsedText Class records the TTS decomposition text. This class has text and related phoneme sequences (used for pattern recognition) and segmented information.

Add paragraph

Adds or inserts a new paragraph. The paragraph must be added to the correct position. That is, the text and phoneme sequence must follow each other. You can delete this section after the function returns.

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

Delete the number of paragraphs and paragraphs

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

Retrieved from "http://www.developer.nokia.com/Community/Wiki/NSSTTS%E9%80%9A%E7%94%A8API"

Comments

(No comments yet)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.