Determines the samplerate of the given audio recording file

    :param filename: filename of the audiofile
    :type filename: str
    :returns: int -- samplerate of the recording

def audiorate(filename):
    """Determines the samplerate of the given audio recording file

    :param filename: filename of the audiofile
    :type filename: str
    :returns: int -- samplerate of the recording
    """
    if '.wav' in filename.lower():
        wf = wave.open(filename)
        fs = wf.getframerate()
        wf.close()
    elif '.call' in filename.lower():
        fs = 333333
    else:
        raise IOError("Unsupported audio format for file: {}".format(filename))

    return fs