Skip to content

Commit

Permalink
Update audiotext_features.py
Browse files Browse the repository at this point in the history
  • Loading branch information
jim-schwoebel authored Aug 14, 2020
1 parent 9df1499 commit 43df4f3
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions features/audio_features/audiotext_features.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,16 +66,17 @@ def prev_dir(directory):
def audiotext_featurize(wavfile, transcript):

# get features
# librosa_features, librosa_labels=lf.librosa_featurize(wavfile, False)
nltk_features, nltk_labels=nf.nltk_featurize(transcript)
textacy_features, textacy_labels=tfe.textacy_featurize(transcript)
spacy_features, spacy_labels=spf.spacy_featurize(transcript)
text_features,text_labels=tfea.text_featurize(transcript)

# features=np.append(np.array(librosa_features), np.array(nltk_features))
# concatenate feature arrays
features=np.append(np.array(nltk_features),np.array(textacy_features))
features=np.append(features,np.array(spacy_features))
labels=nltk_labels+textacy_labels+spacy_labels
# labels=librosa_labels+nltk_labels+textacy_labels+spacy_features
features=np.append(features, np.array(text_features))

# concatenate labels
labels=nltk_labels+textacy_labels+spacy_labels+text_labels

return features, labels

0 comments on commit 43df4f3

Please sign in to comment.