首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >动态更改OpenEars间距(动态)

动态更改OpenEars间距(动态)
EN

Stack Overflow用户
提问于 2013-05-08 22:12:45
回答 1查看 135关注 0票数 0

我有一个使用OpenEars应用程序接口读取文本的iOS应用程序。我使用的是最新版本(1.2.5)。我不知道如何改变音高,而单词正在被阅读(“在飞行中”)。我创建了一个滑块来控制音高。当滑块改变时,将触发一个代理。在委托函数中,FliteController target_mean被更改。其目的是在target_mean值更改后立即更改音调。我的代码如下:

代码语言:javascript
复制
-(void)sayTheMessage:(NSString *)message {

    // if there is nothing there, don't try to say anything
    if (message == nil)
        return;

    [self.oeeo setDelegate:self];

    // we are going to say what is in the label...
    @try {

        // set the pitch, etc...
        self.flite.target_mean = pitchValue; // Change the pitch
        self.flite.target_stddev = varienceValue; // Change the variance
        self.flite.duration_stretch = speedValue; // Change the speed

        // finally say it!
        [self.flite say:message withVoice:self.slt];

    }
    @catch (NSException *exception) {

        if ([delegate respondsToSelector:@selector(messageError)])
            [delegate messageError];        
    }
    @finally {

    }
}


-(void)changePitch:(float)pitch {

    if ((pitch >= 0) && (pitch <= 2)) {

        // save the new pitch internally
        pitchValue = pitch;

        // change the pitch of the current speaking....
        self.flite.target_mean = pitchValue;
    }

}

有什么想法吗?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2013-05-09 19:33:58

这里是OpenEars开发人员。您不能使用FliteController动态更改音调,因为音调是在语音处理之前设置的。

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/16442992

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档