Code covered by the BSD License
-
ec_load_data_dictionary()
Opens a dialog for user to choose a data dictionary file to load
-
ec_scopes(mode)
Copyright 2008 The MathWorks, Inc.
-
example_sel2html(fn,new)
Convert example_sel text files to HTML documents
-
lms_driver
Copyright 2008 The MathWorks, Inc.
-
lms_driver(rin_record,sin_rec...
Copyright 2008 The MathWorks, Inc.
-
lms_fixed(rin, sinp)
Copyright 2008 The MathWorks, Inc.
-
lms_fixed(rin, sinp)
Copyright 2008 The MathWorks, Inc.
-
lms_fixed_use_emlc(rin, sinp)
Copyright 2008 The MathWorks, Inc.
-
near_to_mic_filt_ws_0p6
NEAR_TO_MIC_FILT_WS_0P6 Returns a discrete-time filter object.
-
slblocks
See also FINDBLIB, LIBBROWSE.
-
ec_concept_data.m
-
ec_data_concept.m
-
ec_data_definitions.m
-
ec_data_fixpt_sc.m
-
ec_data_single.m
-
ec_fixed_setup.m
-
ec_fixed_setup_structures.m
-
ec_single_vs_fixed_data.m
-
hfk_pp.m
-
myec_lct_script.m
-
myec_lct_script_dbl.m
-
myec_lct_script_single.m
-
plot_logged_data.m
-
run_exsel.m
-
to_header.m
-
ec_concept
-
ec_config_subsys
-
ec_datadict_buses
-
ec_fixed_config_subsys
-
ec_fixed_eml_simple
-
ec_fixed_lct_tb1
-
ec_fixed_packngo
-
ec_fixed_slm_16bit_tb1
-
ec_fixed_slm_hardcode
-
ec_fixed_slm_structures
-
ec_fixed_slm_verify
-
ec_fixed_slm_with_bypass
-
ec_fixed_slm_with_bypass_reset
-
ec_fixed_slp_brute_force
-
ec_fixed_slp_fb_better
-
ec_fixed_slp_sb
-
ec_fixed_slp_sb_autoscaled
-
ec_fixed_slp_sb_with_mask
-
ec_lib
-
ec_playback
-
ec_single_vs_fixed
-
ec_single_vs_fixed
-
ec_single_vs_fixed_autoscale
-
ec_using_config
-
echo_cancel_library_enabled
-
mulaw1
-
mulaw2
-
must_init_outputs_in_for_loops
-
playback_wav
-
record_wav
-
to_from_soundcard
-
View all files
from
Echo Canceller Workbook targeting a dsPIC
by Kerry Schutz
This set of models and word documents show an echo canceller development workflow.
|
| ec_data_fixpt_sc.m |
%% Echo Cancellation Data Specification (Single Precision)
% This file is best navigated using "Show cell titles"
% Note that this is an m-script which means all variables
% are evaluated in the base workspace.
%
% Signal Objects Note:
% Since multiple signals in model will have this name it is
% important to explicitly resolve these signals in the model's
% Configuration Parameters Dialog
% Diagnostics -> Data Validity -> Explicit Only
% Copyright 2008 The MathWorks, Inc.
%% Model parameters
load sm_filt; % spkr_to_mic filter coefficients
pic_frame_size = 80;
Fs = 8000;
Ts = 1/Fs;
mpt_dimensions = [pic_frame_size 1];
ec_length = 32;
ec_window_len = 256; % 256/8000 = 32 msec should be long enough to capture echo energy.
%% Input Signal: rin_linear
rin_linear = mpt.Signal;
rin_linear.SamplingMode ='Frame based';
rin_linear.Dimensions = mpt_dimensions;
rin_linear.Description = 'Far End Voice';
rin_linear.DataType = 'fixdt(1,16,15)';
rin_linear.RTWInfo.StorageClass = 'ImportedExtern';
%% Input Signal: sin_linear
sin_linear = mpt.Signal;
sin_linear.SamplingMode ='Frame based';
sin_linear.Dimensions = mpt_dimensions;
sin_linear.Description = 'Near end voice plus echo';
sin_linear.DataType = 'fixdt(1,16,15)';
sin_linear.RTWInfo.StorageClass = 'ImportedExtern';
%% Input Signal: sout_linear
sout_linear = mpt.Signal;
sout_linear.SamplingMode ='Frame based';
sout_linear.Dimensions = mpt_dimensions;
sout_linear.Description = 'Echo Cancelled Output (near end)';
sout_linear.DataType = 'fixdt(1,16,15)';
sout_linear.RTWInfo.StorageClass = 'ImportedExtern';
%% Input Signal: Echo Cancellor Weights (Wts)
Wts = mpt.Signal;
Wts.SamplingMode ='Sample based';
Wts.Dimensions = ec_length;
Wts.Description = 'Echo Cancellor Taps';
Wts.DataType = 'fixdt(1,16,15)';
Wts.RTWInfo.StorageClass = 'Auto';
%% LMS Parameters
temp = eval(Wts.DataType);
LMS_Wts_WordLen = temp.WordLength;
LMS_Wts_FracLen = temp.FractionLength;
LMS_Prod_WordLen = 16;
LMS_Prod_FracLen = 15;
LMS_Accum_WordLen = 32;
LMS_Accum_FracLen = 20;
LMS_Parms_WordLen = 16;
LMS_StepSize_FracLen = 15;
LMS_Leakage_FracLen = 15;
%% Input Signal: enable
enable = mpt.Signal;
enable.SamplingMode = 'Sample based';
enable.Dimensions = 1;
enable.Description = 'Enable the Echo Canceller';
enable.DataType = 'int16';
enable.RTWInfo.StorageClass = 'Auto';
%% Input Signal: mu
mu = mpt.Signal;
mu.SamplingMode = 'Sample based';
mu.Dimensions = 1;
mu.Description = 'Echo Canceller Step Size';
mu.DataType = 'fixdt(1,16,15)';
mu.RTWInfo.StorageClass = 'Auto';
%% Input Signal: reset
reset = mpt.Signal;
reset.SamplingMode = 'Sample based';
reset.Dimensions = 1;
reset.Description = 'Clear the echo canceller taps to all zeros';
reset.DataType = 'int16';
reset.RTWInfo.StorageClass = 'Auto';
%% speaker to mic parms
spkr_to_mic_delay = 10;
%spkr_to_mic_filt; % filter is loaded from
spkr_to_mic_gain = 1;
%% talker to mic parms
talker_to_mic_delay = 1;
talker_to_mic_filt = 1;
talker_to_mic_gain = 1;
|
|
Contact us