Comments (2)
Hi @ASR2020Guru
You are right on the fact that a zero padding is not the right way to combine those features
There are two reasons why you are getting different lengths for the phonation and fbank features
- Phonation features are only computed for speech segments where there is F0 values, i.e., only for voiced segments
Check the code in
DisVoice/phonation/phonation.py
Line 193 in 67c2f0c
for l in range(nF):
data_frame=data_audio[int(l*size_stepS):int(l*size_stepS+size_frameS)]
energy=10*logEnergy(data_frame)
if F0[l]!=0:
Amp.append(np.max(np.abs(data_frame)))
logE.append(energy)
if lnz>=12:
amp_arr=np.asarray([Amp[j] for j in range(lnz-12, lnz)])
#print(amp_arr)
apq.append(APQ(amp_arr))
if lnz>=6: # TODO:
f0arr=np.asarray([F0nz[j] for j in range(lnz-6, lnz)])
ppq.append(PPQ(1/f0arr))
lnz=lnz+1
In case you want to combine the features you should add an else: statement and add zero values to variables Amp
, logE
, apq
, and ppq
-
In addition, you should consider that apq is only computed after the 12th frame because it is a log-term perturbation with respect to the 11th previous frames, thus they have to padd 11 zeros at the beginning for this feature.
-
The same ocurrs for ppq, but in this case with the first five frames
If you add these padds at the beginning for apq and ppq you should remove this line where it considers only those frames after the 12th, in orderto properly merge apq and ppq with the rest of the features
DisVoice/phonation/phonation.py
Line 224 in 67c2f0c
If you have further questions, let me know and I can help you
from disvoice.
Hi @jcvasquezc ,
Thanks for your quick and helpful reply.
Now I managed to combine these features correctly.
I will let you know if I have any further questions.
Cheers
from disvoice.
Related Issues (20)
- Error with Glottal Features
- `calc_residual(x_filt,x_emph,...)` instead of `calc_residual(x_filt,x_filt,...)`? HOT 1
- Minimum length of input audio segment HOT 9
- ValueError in glottal feature extraction HOT 2
- Preprocessing before feature extraction HOT 7
- Is there a simpler way to obtain glottal flow signal? HOT 1
- VisibleDeprecationWarning and TypeError: can't convert cuda:0 device type tensor to numpy.
- Will a parselmouth-praat version be released? HOT 2
- python glottal.py "../audios/098_u1_PCGITA.wav" "glottalfeaturesUdyn" "false" "false" "kaldi" error
- Getting None object when extracting glottal features HOT 1
- ValueError: zero-size array to reduction operation minimum which has no identity HOT 3
- import disvoice throws error ModuleNotFoundError: No module named 'disvoice.glottal.glottal' HOT 3
- Unable to install disvoice on MaAC m1 chip, ERROR: Could not find a version that satisfies the requirement kaldi_iotqdmmatplotlibnumpytorchlibrosapandaspysptkphonetscipyscikit_learn
- typo HOT 1
- Error while extracting articulation features HOT 2
- about the Phonological and replearning problem
- Feature Selection Algorithm
- Error in Articulation features HOT 6
- Prosodic Features
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from disvoice.