Skip to content

Commit 4177571

Browse files
authored
Linux support for overhauled StftPitchShift (cmake build of StftPitchShift for Linux)
Linux support for overhauled StftPitchShift.
2 parents d7778b3 + c1d37de commit 4177571

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

my_utils.py

+10-3
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,19 @@
44
# import praatio
55
# import praatio.praat_scripts
66
import os
7+
import sys
8+
79
import random
810

911
import sqlite3
1012

13+
platform_stft_mapping = {
14+
'linux': 'stftpitchshift',
15+
'darwin': 'stftpitchshift',
16+
'win32': 'stftpitchshift.exe',
17+
}
1118

12-
19+
stft = platform_stft_mapping.get(sys.platform)
1320
# praatEXE = join('.',os.path.abspath(os.getcwd()) + r"\Praat.exe")
1421

1522

@@ -60,8 +67,8 @@ def load_audio(file, sr, DoFormant, Quefrency, Timbre):
6067

6168

6269
os.system(
63-
'stftpitchshift.exe -i "%s" -q "%s" -t "%s" -o "%sFORMANTED_%s.wav"'
64-
% (file_formanted, Quefrency, Timbre, file_formanted, str(numerator))
70+
'%s -i "%s" -q "%s" -t "%s" -o "%sFORMANTED_%s.wav"'
71+
% (stft, file_formanted, Quefrency, Timbre, file_formanted, str(numerator))
6572
)
6673

6774

stftpitchshift

1.74 MB
Binary file not shown.

0 commit comments

Comments
 (0)