How to calculate pitch fundamental frequency f( 0) ) in time domain? I am new in DSP, trying to calculate fundamental frequency ( f(0) ) for each segmented frame of the audio file. The methods of F0 estimation can be divided into three categories: 


based on temporal dynamics of the signal time-domain; 
based on the frequency structure frequency-domain, and 
hybrid methods.


Most of the examples are estimating fundamental frequency based on the frequency structure frequency-domain, I am looking for based on temporal dynamics of the signal time-domain.

This article provides some information but I am still not clear how to calculate it in the time domain?

https://gist.github.com/endolith/255291

This is the code, I have found, used so far :

def freq_from_autocorr(sig, fs):
    """
    Estimate frequency using autocorrelation
    """
    # Calculate autocorrelation and throw away the negative lags
    corr = correlate(sig, sig, mode='full')
    corr = corr[len(corr)//2:]

    # Find the first low point
    d = diff(corr)
    start = nonzero(d &gt; 0)[0][0]

    # Find the next peak after the low point (other than 0 lag).  This bit is
    # not reliable for long signals, due to the desired peak occurring between
    # samples, and other peaks appearing higher.
    # Should use a weighting function to de-emphasize the peaks at longer lags.
    peak = argmax(corr[start:]) + start
    px, py = parabolic(corr, peak)

    return fs / px


How to estimate in time domain?

Thanks in advance!
This paper by Philip McLeod details finding pitch in the time domain, and specifically that it avoids the reduced resolution of equivalent frequency domain approaches due to the windowing required to eliminate spectral leakage.

https://cdn.instructables.com/ORIG/F3J/3Q7U/J20P2R5T/F3J3Q7UJ20P2R5T.pdf

I don't have experience with this approach but would be very interested in comparative results to the best frequency domain approach- if you could post them, assuming you pursue this further.