Импортировать звуковое оформление в файл Python - PullRequest
0 голосов
/ 21 декабря 2018

Я импортирую SoundTouch_x64.dll (из http://www.surina.net/soundtouch/index.html). Это нормально. Но как мне запустить soundstrech function of SoundTouch_x64.dll` в моей программе на python? (Я не хочу запускать отдельный soundstrech.exe изpython - так работает). Я бы предпочел запустить его как модуль.

Рабочий скрипт:

import os
import subprocess
FNULL = open(os.devnull, 'w') 
args = "soundstretch.exe input.wav output.wav -pitch=2" 
subprocess.call(args, stdout=FNULL, stderr=FNULL, shell=False)`

Не работает скрипт:

import ctypes  
hllDll = ctypes.WinDLL("SoundTouch_x64.dll")
print('Imported')   
hllDll.soundstretch("input.wav", "output.wav", "pitch=2")

Дает:

AttributeError: function 'soundstretch' not found
...