Question

First -- use an 8 kHz sampled speech signal (or higher), the Discrete Hilbert Transform, filters,...

First -- use an 8 kHz sampled speech signal (or higher), the Discrete Hilbert Transform, filters, etc., and implement the algorithm we outlined in class (and in the handout). Start with a scrambler using a fixed foldover frequency and finish with a Fancy Scrambler that uses a set of random foldover frequencies. Recovery is achieved using the same type of scrambler to undo the frequency inversion.

Second -- implement a voice scrambler of your own devising. Any type of scrambling is okay, however, you must write the code to scramble and unscramble the speech and the unscrambled speech should be clearly intelligible.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Voice Scrambler has been implemented. The approach uses a fixed foldover frequency and ultimately develops algorithms using filtering and modulation. With voice as input, the output is the scrambled voice. Here, the wider input signal bandwidth is achieved using an up-sampling scheme. This scrambling method is often referred to as frequency inversion.

The input voice 'folds' into a carrier signal. The frequency inversion causes a shift in the frequency spectrum with upper and lower sidebands.

Here is the code:

Here is the code text:

#include "C6211dsk.h"
#include “C6211dskinit.h”       // DSK support file
#include "sine.h"               // file with sine data values
#include "coeff.h"               // coefficient file short processdata(short data);
short filter(short inp,short *mem); short MultSine(short input);
static short filter1[COEFF],filter2[COEFF]; short input, output;

void main()
{
int i;
comm_poll();                   // init DSK/codec for( i=0; i< COEFF; i++)

{
filter1[i] = 0;                   // init buffer for filtered input signal - 1st filter
filter2[i] = 0;                   // init buffer for modulated signal - 2nd filter
}
while(1)
{
input = input_sample();           // input data from codec
processdata(input);               // process the sample twice to upsample output = processdata(input);                                       // and throw away the first result output_sample(output);   // to decimate, then output
}
}

short processdata(short data)
{
data = filter(data,filter1);   // call filter function – 1st filter
data = MultSine(data);           // call function to generate sine and modulate data = filter(data,filter2);                                   // call filter function – 2nd filter
return data;
}
  
short filter(short inp,short *mem)           // implements lowpass filter
{
int j; long acc;
mem[COEFF-1] = inp;                       // bottom memory for newest sample
acc = mem[0] * coeff[0];               // y(0) = x[n-(COEFF-1)] * h[COEFF-1] for (j = 1; j < COEFF; j++)
{
acc += mem[j] * coeff[j];               // y(n) = x[n-(COEFF-1-j)] * h[COEFF-1-j] mem[j-1] = mem[j];   // update delay samples (x(n+1-i)=x(n-i)
}
acc = ((acc)>>15);   // scale result
return acc;   // return y(n) at time n
}

short MultSine(short input)                       // sine generation and modulation function
{
static int j=0;
input = (input * sine[j++]) >> 11;               // input to multiplier * sine data if(j>=SINE) j = 0;
return input;   // return modulated signal
}

Add a comment
Know the answer?
Add Answer to:
First -- use an 8 kHz sampled speech signal (or higher), the Discrete Hilbert Transform, filters,...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT