[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Patch (rather for discussion): sonic and samplerate implementation
From: |
Andrei . Kholodnyi |
Subject: |
Patch (rather for discussion): sonic and samplerate implementation |
Date: |
Wed, 08 Dec 2010 11:39:09 +0000 |
On Dec 7, 2010 9:35am, "Bohdan R. Rau" <ethanak at polip.com> wrote:
> On Mon, 6 Dec 2010 20:33:14 +0100, Andrei Kholodnyi
> andrei.kholodnyi at gmail.com> wrote:
> [...]
> >> It was necessary to add some code to ivona.c (like UPDATE_PARAMETER).
> > why? since it does nothing, why do you need it in ivona.c?
> Hm... on my system these changes in ivona.c allows to change rate/pitch.
> It was not implemented in original ivona.c, as Ivona-1 server does not
> allow to change pitch and rate, and even new Ivona-2 (probably will be
> never shipped for Linux) can't change pitch.
ok, that's fine for now.
> > AudioTrack * spd_audio_effect(AudioTrack *track,...)
> > since you need an output as well.
> Hm... I must rethink it (I don't think I like this solution).
> But may be we should be more radical?
> As we have only some modules - there is no problem to add some lines to
> each module.
The idea is to remove all audio specific stuff from the modules.
you get AudioTrack out of your synth and do whatever you want with it based
on the module capabilities.
Eg if module has no capability "set rate",
then you can apply spd_audio_effect function on top of AudioTrack you got
from this module.
In pseudo code:
if (get_capabilities (module) & SET_RATE)
module_set_rate(rate);
module_speak(text);
and then in callback
module_tts_callback(AudioTrack at) {
spd_audio_effect(at, rate);
send_to_audio(at);
}
As you can see all these steps can be done in module_utils, ie outside
particular module.
But for that we need some further code clean up.
> For me it should be:
> a) something like spd_audio_track_init(track) - fills all track structure
> with zeroes
> b) move third parameter of spd_audio_play into field in track structure
yes, I agree. Let me provide a patch for it.
> c) change second parameter of spd_audio_play from AudioTrack into
> AudioTrack * so we can safely change size of AudioTrack structure
agree, we do not need two different in/out AudioTrack structs
> Then spd_audio_effect function could only manipulate some extended
> AudioTrack fields (rate, pitch, contrast, may be equalizer...), and all
> needed data manipulations would be done inside spd_audio_play?
we have 3 params we can control: pitch, rate and voume
It is still questionable to me how we can put any other params like
contrast etc. into this equation.
> BTW regarding contrast:
> I think changing contrast via speech-dispather API is not needed. In fact,
> increasing contrast has meaning primarily with low-end audio system (my
> Aspire One netbook is very good candidate as it has something strange
> instead of speakers), so it may be left as parameter in module
> configuration.
> In other hand - we could make contrast with volume working together (it
> has sense as contrast increases loudness) - for example (the value 80 is
> taken as example only):
> effective_volume=(volume>80)?80:volume; /* 80 means "maximum" */
> effective_contrast=(volume>80)?5*(volume-80):0; /* or compute
> effective_contrast with "comtrast" from module configuration and volume */
Yes, if contract is bounded to the volume it make sense then.
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.freebsoft.org/pipermail/speechd/attachments/20101208/4b501993/attachment.htm>
- Patch (rather for discussion): sonic and samplerate implementation, (continued)
- Patch (rather for discussion): sonic and samplerate implementation, Bohdan R . Rau, 2010/12/04
- Patch (rather for discussion): sonic and samplerate implementation, Andrei Kholodnyi, 2010/12/05
- Patch (rather for discussion): sonic and samplerate implementation, Bohdan R . Rau, 2010/12/06
- Patch (rather for discussion): sonic and samplerate implementation, Bohdan R . Rau, 2010/12/06
- Patch (rather for discussion): sonic and samplerate implementation, Andrei Kholodnyi, 2010/12/06
- Patch (rather for discussion): sonic and samplerate implementation, William Hubbs, 2010/12/06
- Patch (rather for discussion): sonic and samplerate implementation, Andrei Kholodnyi, 2010/12/06
- Patch (rather for discussion): sonic and samplerate implementation, Tomas Cerha, 2010/12/06
- Patch (rather for discussion): sonic and samplerate implementation, Bohdan R . Rau, 2010/12/07
- Patch (rather for discussion): sonic and samplerate implementation, Bohdan R . Rau, 2010/12/07
- Patch (rather for discussion): sonic and samplerate implementation,
Andrei . Kholodnyi <=
- Patch (rather for discussion): sonic and samplerate implementation, Bohdan R . Rau, 2010/12/06