GL Communications Inc.
 
 
 
Home > Client Server Software

DSP Script: Adding Noise and Phase Shift Tone
to the Speech Data

Script Description:

This script transmits an amplified speech file with a continuously phase shifted tone combined with a white noise through a filter.

Variation 1:

  • Connect two PCs A and B . Run the script on PC A and verify the output on PC B. Do not run the GUI on PC A.
  • Add the speech file with the white noise of -40dBm.
  • Amplify the output by 5 dB.
  • Attenuate the tone of 2400 hz frequency -20dbm power and with a phase shift of 30 degrees per second, by 10dB.
  • Add this output to the speech output.
  • Add white noise of -40dBm to this.
  • Filter it by using the filter file 'g8-m1.xfr' and transmit it.

Script:

// Connection assumed: connect card1 and card2 from PC 'A' to card1 and card2 of PC 'B' respectively. // this script should not be run simultaneously with GUI
//MODE:SEQUENTIAL
//
// User needs to comment the commands according to his requirement
//
//BOARD SETTINGS...
//
//INTERFACE SETTINGS
set rx interface terminate #*;
//set rx interface monitor #*;
//set rx interface bridge #*;
wait 3000;
//
//FRAME FORMAT SETTINGS FOR T1
set superframe format esf #*;
//set superframe format d4 #*;
//
//FRAME FORMAT SETTINGS FOR E1
//set signaling mode cas #*;
//set signaling mode ccs #*;
//set crc4 on#*;
//set crc4 off #*;
//
//CLOCK SETTINGS
set tx clock source internal #*;
//set tx clock source recovered #*;
//set tx clock source external #*;
//
//LOOPBACK SETTINGS
//set inward driver loopback on #*;
//set outward driver loopback on #*;
set outward driver loopback off #*;
set inward driver loopback off #*;
wait 3000;
//
//- - - - - - - - - --Verification of initialization
//CHECKING FORMAT SETTINGS FOR T1
get superframe format #*;
//
//CHECKING FORMAT SETTINGS FOR E1
//get signaling mode #*;
//
//CHECKING OTHER SETTINGS FOR THE CARDS
get tx clock source #*;
get outward driver loopback #*;
get rx line frequency #*;
get rx line level #*;
wait 3000;
//
set latency 3;
set response 9;
set priority default;
get response;
get latency;
get priority;
set latency default;
set response default;
//
//For T1 only
tx(filter(sum(delay(sum(amplify(sum(infile( "Mu-Law Samples⁄vijay.pcm" ),whitenoise (-40)),5),atten(phase shift tone (2400, -20, 30, 1 sec),10)), 5000msec),whitenoise(-40)),"filter files⁄g8-m1.xfr"),#1:2) ;
//For E1 only
tx(filter(sum(delay(sum(amplify(sum(infile( "a-Law Samples⁄b52_alaw.pcm" ),whitenoise (-40)),5),atten(phase shift tone (2400, -20, 30, 1 sec),5)), 5000msec),whitenoise(-40)),"filter files⁄g8-m1.xfr"),#1:2) ;
//ENDING THE TASK
end task *;

Variation 2:
  • Add the speech file with the white noise of -40dBm.
  • Amplify the output by 5 dB. This is op1.
  • Transmit a tone of 2400 hz power -20dBm,phase shift it by 30degrees per second.
  • Attenuate it by 30dB this is op2.
  • op3 is sum of op1 and op2 , delayed by 5 seconds.
  • op4 is obtained by filtering the sum of op3 and white noise of -40dBm.

Script:

// Connection assumed: connect card1 and card2 from PC 'A' to card1 and card2 of PC 'B' respectively.
// this script should not be run simultaneously with GUI
//MODE:SEQUENTIAL
//
// User needs to comment the commands according to his requirement
//
//BOARD SETTINGS...
//
//INTERFACE SETTINGS
set rx interface terminate #*;
//set rx interface monitor #*;
//set rx interface bridge #*;
wait 3000;
//
//FRAME FORMAT SETTINGS FOR T1
set superframe format esf #*;
//set superframe format d4 #*;
//
//FRAME FORMAT SETTINGS FOR E1
//set signaling mode cas #*;
//set signaling mode ccs #*;
//set crc4 on#*;
//set crc4 off #*;
//
//CLOCK SETTINGS
set tx clock source internal #*;
//set tx clock source recovered #*;
//set tx clock source external #*;
//
//LOOPBACK SETTINGS
//set inward driver loopback on #*;
//set outward driver loopback on #*;
set outward driver loopback off #*;
set inward driver loopback off #*;
wait 3000;
//
//- - - - - - - - - --Verification of initialization
//CHECKING FORMAT SETTINGS FOR T1
get superframe format #*;
//
//CHECKING FORMAT SETTINGS FOR E1
//get signaling mode #*;
//
//CHECKING OTHER SETTINGS FOR THE CARDS
get tx clock source #*;
get outward driver loopback #*;
get rx line frequency #*;
get rx line level #*;
wait 3000;
//
set latency 3;
set response 9;
//set priority default;
get response;
get latency;
get priority;
set latency default;
set response default;
//For T1 only
dspop {op1=amplify(sum(infile( "Mu-Law Samples⁄vijay.pcm" ),whitenoise (-40)),5),op2=atten(phase shift tone(2400,-20,30,1),10),op3=delay(sum(op1,op2),5000msec),op4=filter(sum(op3,white noise(-40)),"filter files⁄g8-m1.xfr"),tx(op4,#1:2)};
//For E1 only
dspop {op1=amplify(sum(infile( "a-Law Samples⁄b52_alaw.pcm" ),whitenoise (-40)),5),op2=atten(phase shift tone(2400,-20,30,1),30),op3=delay(sum(op1,op2),5000msec),op4=filter(sum(op3,white noise(-40)),"filter files⁄g8-m1.xfr"),tx(op4,#1:2)};
//ENDING THE TASK
end task *;

 Back to Client Server Software Page



 
 
Home Page Sitemap Global Presence Email