How to find a know signal in another signal which contains other signals along with the signal i need in python
I made a little research on detecting the sync_start location on my received signal.

First I modulated the bits (sync_start bits + data bits + sync_end bits) with a sine signal as my carrier, with a frequency of $20 \text{ kHz}$ and a total length of 10000 bits (including both sync_start and sync_end). 

I then converted this modulated wave into a .wav file 
and played it on my PC, while recording simultaniously on an another PC, using Pyaudio (Python). That gave me a recorded .wav - my received signal.

Now as I knew my sync bits value, I modulated them on the same carrier wave and cross correlated this with the received wave. 

Case 1:

$\text{bit length} = 10000$ (including sync_start and sync_end), 

$\text{number of sync_start bits} = \text{sync_end} = 2287$

The plot of cross correlation is as shown :



Case 2:

$\text{bit length} = 15000$



case 3:

$\text{bit length} = 20000$



As the data length increases(keeping our sync_start and sync_end same in all cases), the exact time stamps of sync_start_mid index and sync_end_mid index gets more accurate.

Note : For data bits here, I took all of them as $1$'s -- that might be the reason for the smaller amplitudes in the middle. I will add random data and see if I am getting the same inference.

Please correct me if there is any mistake in my inference. As far as now I am now able to exactly pinpoint the synchronization between transmitted and received waves.

I also wanted to know the limitations of length of the sync bits (because when my sync bits length gets smaller, the dominant peak location cannot be found from cross correlation).

And I am using a BPSK scheme.