%COMMBLUETOOTHVOICE_INIT Initializes variables for Bluetooth Voice Transmission % example (commbluetoothvoice.slx) % Copyright 1996-2012 The MathWorks, Inc. % modified for Matlab 2022a by mag, HES-SO Valais, course SDi % Set input wave sample rate to be 8kHz Input_Fs=8000; sigin = audioread('commbluetoothvoice_input.wav'); % Coefficients for speech interpolation [y,interp_coeffs]=interp(ones(1,10),8); % Header Information % Header_Info=[Slave_Address;Packet_Type;Flow_Control;ARQ;Sequence]; Slave_Address= [1 0 1]'; Packet_Type= [1 0 1 0]'; Flow_Control= [1]; ARQ=[1]; Sequence=[1]; Access_Code=zeros(72,1); Access_Code(1:2:72)=1; % Initialize 1,0,1,0, sequence One_Zero_Payload=zeros(240,1); One_Zero_Payload(1:2:240)=1; % Set Seeds % modified by mag: replaced randseed() by '' hop_seed=1; awgn_channel_seed=2; awgn_802_seed=3; rate_802_seed=4; data_seed=5; % Hop frequency if fixed fixed_hop_freq=20; % Assign payload bits Num_Payload_Bits=80;