mmorise / World

A high-quality speech analysis, manipulation and synthesis system
http://www.kisc.meiji.ac.jp/~mmorise/world/english
Other
1.17k stars 251 forks source link

how to get the f0 ? #79

Closed ucasiggcas closed 5 years ago

ucasiggcas commented 5 years ago

Dear,

I only get the pic down with test.cpp, if I want to get the f0, what I should do ?

image

Thanks a lot

ucasiggcas commented 5 years ago

where is the f0 out ?how to get the f0 ? and how to deal it ?

mmorise commented 5 years ago

In test.cpp, there is a member variable related to F0 in the struct "WorldParameters". The member variable "F0" is the F0, and it is a double-type array. You can output it with standard functions in C++ or C language.

p.s. WORLD can estimate the F0 and spectral envelope in speech signal with sampling of 8 kHz. But, we cannot get the aperiodicity from such speech signal.

ucasiggcas commented 5 years ago

@mmorise Dear, My scripts as follows, but the results are always 0, is the code wrong ?? // DIO F0EstimationDio(x, x_length, &world_parameters); for (int n=0;n<world_parameters.f0_length;n++) cout << "Dio:freq=" << *(world_parameters.f0+n) << endl; //Harvest F0EstimationHarvest(x,x_length, &world_parameters); for (int n = 0; n < world_parameters.f0_length; n++) cout << "Harvest:freq=" << *(world_parameters.f0+n) << endl;

Thanks a lot .

YuzukiTsuru commented 5 years ago

@ucasiggcas This is my code which is added to: https://github.com/mmorise/World/blob/dac5e44b72d505bcc280ac20040b694a268c174b/test/test.cpp#L157

        Harvest(x, x_length, world_parameters->fs, &option,
                world_parameters->time_axis, world_parameters->f0);
        printf("Harvest: %d [msec]\n", timeGetTime() - elapsed_time);
        for (int i(0); i < world_parameters->f0_length; i++) {
            std::cout << world_parameters->f0[i] << std::endl;
        }

To run it,You should add

#include <iostream>

at the top of the code file

hope is helpful

PS. If the wav is unvoiced,it will show a list of 0 in the output

ucasiggcas commented 5 years ago

@GloomyGhost-MosquitoCoil Dear,

Thanks,

but I have a wav file down, in fact, the pitch of the wav file is about 1170Hz, however, no matter which method in the WORLD couldn't get the right pitch.

Could U help me to get the pitch with some method ? Maybe praat is the best way, but it's source code is difficult to understand and I do not want to use other language( Python,matlab,R ),

Any help will be grateful.

Thx.

Lychee gz01.zip

YuzukiTsuru commented 5 years ago

@giuliopaci Try to set the

option.f0_floor = 40.0;

to

option.f0_floor = 1.0;

And see what will happen

ucasiggcas commented 5 years ago

@GloomyGhost-MosquitoCoil

No use,

the method is out of power.

Thanks all the same.

YuzukiTsuru commented 5 years ago

@GloomyGhost-MosquitoCoil

No use,

the method is out of power.

Thanks all the same.

You need try to edit it to find the best output,besides i do not think the f0 of world is "HZ"

YuzukiTsuru commented 5 years ago

Seems I forgot that the dio need with StoneMask....