Skip to content

Commit

Permalink
fix LPC NaN Bug
Browse files Browse the repository at this point in the history
  • Loading branch information
ppwwyyxx committed Mar 19, 2015
1 parent 5c0a0c4 commit abf6a0a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,9 @@ Our GUI not only has basic functionality for recording, enrollment, training and

![graph](https://github.com/ppwwyyxx/speaker-recognition/raw/master/doc/Final-Report-Complete/img/gui-graph.png)

See our [demo video](https://github.com/ppwwyyxx/speaker-recognition/raw/master/demo.avi) (in Chinese) for more details.
You should understand that real-time speaker recognition is extremely hard, because we only use corpus of about 1 second length to identify the speaker.
Therefore the real-time system doesn't work very perfect.
You can See our [demo video](https://github.com/ppwwyyxx/speaker-recognition/raw/master/demo.avi) (in Chinese).

## Command Line Tools
```sh
Expand Down
6 changes: 4 additions & 2 deletions src/feature/LPC.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python2
# -*- coding: UTF-8 -*-
# File: LPC.py
# Date: Sat Feb 21 18:41:51 2015 +0800
# Date: Thu Mar 19 19:37:11 2015 +0800
# Author: Yuxin Wu <[email protected]>

import time
Expand Down Expand Up @@ -52,7 +52,9 @@ def extract(self, signal):
frame[1:] -= frame[:-1] * self.PRE_EMPH
feature.append(self.lpcc(frame))

return array(feature)
feature = array(feature)
feature[isnan(feature)] = 0
return feature

@cached_func
def get_lpc_extractor(fs, win_length_ms=32, win_shift_ms=16,
Expand Down

0 comments on commit abf6a0a

Please sign in to comment.