Monday, 5 April 2021

Record voice coming of a certain PID Ubuntu

I am working on text to speech algorithm, i finally made it, what this algorithm do is turn an html file

into speech, like that : python record.py file.html

and all good on here, but i want to run the same command on multiple files using this command :

python record.py file1.html & python record.py file2.html & python record.py file3.html

but instead of recording every audio separately i get an overlap on the output .

PS1: i am using ubuntu server, and i want to run my command on over 6000 file, the approximate time needed per file is around 20 mins bc they are a big files.

PS2: I am using pyaudio to record the voices, and here is the recording part in my code:

p = pyaudio.PyAudio()

stream = p.open(format=FORMAT, channels=CHANNELS, rate=RATE,input=True, frames_per_buffer=CHUNK)

print("started recording")
for i in range(0, int(RATE / CHUNK * RECORD_SECONDS)):
    audio = stream.read(CHUNK)
    frames.append(audio)

Is there any way to record audio coming from a certain PID.

I've heard about docker containers, but i dont know if it gonna help in this situation.

Additionnal information !!

the record.py record voice from google chrome



from Record voice coming of a certain PID Ubuntu

No comments:

Post a Comment