@@ -106,22 +106,22 @@ public extension File {
106106 // MARK: - Audio Processing
107107
108108 @discardableResult public func slowDownAudio( newName: String , percent: Float ) throws -> File {
109- run ( " /usr/local/bin/sox " , path, newName, " tempo " , " -s " , String ( percent) )
109+ run ( ScriptToolkit . soxPath , path, newName, " tempo " , " -s " , String ( percent) )
110110 return try File ( path: newName)
111111 }
112112
113113 @discardableResult public func convertToWav( newName: String ) throws -> File {
114- run ( " /usr/local/bin/ffmpeg " , " -i " , path, " -sample_rate " , " 44100 " , newName. deletingPathExtension + " .wav " )
114+ run ( ScriptToolkit . ffmpegPath , " -i " , path, " -sample_rate " , " 44100 " , newName. deletingPathExtension + " .wav " )
115115 return try File ( path: newName)
116116 }
117117
118118 @discardableResult public func convertToM4A( newName: String ) throws -> File {
119- run ( " /usr/local/bin/ffmpeg " , " -i " , path, " -sample_rate " , " 44100 " , newName. deletingPathExtension + " .m4a " )
119+ run ( ScriptToolkit . ffmpegPath , " -i " , path, " -sample_rate " , " 44100 " , newName. deletingPathExtension + " .m4a " )
120120 return try File ( path: newName)
121121 }
122122
123123 @discardableResult public func addSilence( newName: String ) throws -> File {
124- run ( " /usr/local/bin/sox " , " /Users/dan/Documents/[Development]/[Projects]/SwiftScripts/practise/silence.wav " , path, newName)
124+ run ( ScriptToolkit . soxPath , ScriptToolkit . silenceFilePath , path, newName)
125125 return try File ( path: newName)
126126 }
127127}
0 commit comments