Skip to content

Commit

Permalink
tensorflow 2 support
Browse files Browse the repository at this point in the history
  • Loading branch information
Camilo Vasquez committed May 2, 2022
1 parent 68c6d40 commit 3b0e16d
Show file tree
Hide file tree
Showing 16 changed files with 68 additions and 1,512 deletions.
3 changes: 1 addition & 2 deletions docs/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@ channels:

dependencies:
- python==3.7
- tensorflow==1.13.1
- tensorflow==2.7.0
- pip:
- keras
- pandas
- pysptk
- six
Expand Down
13 changes: 8 additions & 5 deletions phonet/example.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,26 +14,29 @@

PATH=os.path.dirname(os.path.abspath(__file__))

path_results=os.path.join(PATH, "examples")

if not os.path.exists(path_results):
os.makedirs(path_results)
## get the "stop" phonological posterior from a single file
file_audio=PATH+"/audios/pataka.wav"
file_feat=PATH+"/phonclasses/pataka"
file_feat=path_results+"/pataka"
phon=Phonet(["stop"])
phon.get_phon_wav(file_audio, file_feat, True)

# get the "nasal" phonological posterior from a single file
file_audio=PATH+"/audios/sentence.wav"
file_feat=PATH+"/phonclasses/sentence_nasal"
file_feat=path_results+"/sentence_nasal"
phon=Phonet(["nasal"])
phon.get_phon_wav(file_audio, file_feat, True)

# get the "strident" phonological posterior from a single file
file_feat=PATH+"/phonclasses/sentence_strident"
file_feat=path_results+"/sentence_strident"
phon=Phonet(["strident"])
phon.get_phon_wav(file_audio, file_feat, True)

# get "strident, nasal, and back" phonological posteriors from a single file
file_feat=PATH+"/phonclasses/sentence_all"
file_feat=path_results+"/sentence_all"
phon=Phonet(["strident", "nasal", "back"])
phon.get_phon_wav(file_audio, file_feat, True)

Expand All @@ -46,7 +49,7 @@
# get phonological posteriors from de audio files included in a directory
directory=PATH+"/phonclasses/"
phon=Phonet(["vocalic", "strident", "nasal", "back", "stop", "pause"])
phon.get_phon_path(PATH+"/audios/", PATH+"/phonclasses2/")
phon.get_phon_path(PATH+"/audios/", path_results)

## get the PLLR features from an audio file
phon=Phonet(["all"])
Expand Down
316 changes: 0 additions & 316 deletions phonet/phonclasses/pataka

This file was deleted.

Binary file removed phonet/phonclasses/patakapost.png
Binary file not shown.
Loading

0 comments on commit 3b0e16d

Please sign in to comment.