Hey so I have been making this script to download audio ,then split the audio, then run 4 similar functions in parallel. It keeps running the first two scripts fine then runs the entire script 4 times over.
from login import account_login
from soundsplitter import sound_splitter
from main import get_sound
from tkinter import *
from functools import partial
start_up = True
if start_up:
get_sound()
print('Sounds have been downloaded')
sound_splitter()
print('Sounds have been split')
start_up = False
if not start_up:
from frequencysplitter import frequency_splitter_Short_30CUT, frequency_splitter_Short_60CUT, \
frequency_splitter_Medium_30CUT, frequency_splitter_Medium_60CUT
import multiprocessing
p1 = multiprocessing.Process(target=frequency_splitter_Short_30CUT)
p2 = multiprocessing.Process(target=frequency_splitter_Short_60CUT)
p3 = multiprocessing.Process(target=frequency_splitter_Medium_30CUT)
p4 = multiprocessing.Process(target=frequency_splitter_Medium_60CUT)
p1.start()
p2.start()
p3.start()
p4.start()
p1.join()
p2.join()
p3.join()
p4.join()
How can I make it so that the get_sound() and sound_splitter() run first and then the multiprocessing kicks up without it running the entire code again