recognizer.py 文件源码

python
阅读 27 收藏 0 点赞 0 评论 0

项目:speaker_recognizer_robot 作者: shrutiyer 项目源码 文件源码
def process_audio(self, isTraining, sound_file):
        """ Takes in a wav file and outputs labeled observations of the audio
            isTraining: bool that is true if the model is being trained
        """
        (rate, sig) = wav.read(sound_file)
        sig = sig.astype(np.float64)
        # MFCC Features. Each row corresponds to MFCC for a frame
        mfcc_feat = mfcc(sig, rate)

        labeled_obs = vq(mfcc_feat, self.codebook)[0]

        self.voice_obs = labeled_obs
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号