From c0addfba83015612e601c270ce5bf06a42b6e295 Mon Sep 17 00:00:00 2001 From: Roman Khassraf Date: Tue, 27 Sep 2016 20:11:42 +0200 Subject: #193: Adding option for enabling voice boundary detection in grgsm_decode --- apps/grgsm_decode | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'apps') diff --git a/apps/grgsm_decode b/apps/grgsm_decode index 94a2ba0..18536c3 100755 --- a/apps/grgsm_decode +++ b/apps/grgsm_decode @@ -39,6 +39,7 @@ class grgsm_decoder(gr.top_block): cfile=None, fc=None, samp_rate=2e6, a5=1, a5_kc=None, speech_file=None, speech_codec=None, + enable_voice_boundary_detection=False, verbose=False, print_bursts=False, ppm=0): @@ -62,6 +63,7 @@ class grgsm_decoder(gr.top_block): self.speech_codec = speech_codec self.verbose = verbose self.print_bursts = print_bursts + self.enable_voice_boundary_detection = enable_voice_boundary_detection ################################################## # Blocks @@ -95,7 +97,7 @@ class grgsm_decoder(gr.top_block): self.sdcch8_demapper = grgsm.gsm_sdcch8_demapper(self.timeslot) elif self.chan_mode == 'TCHF': self.tch_f_demapper = grgsm.tch_f_chans_demapper(self.timeslot) - self.tch_f_decoder = grgsm.tch_f_decoder(speech_codec) + self.tch_f_decoder = grgsm.tch_f_decoder(speech_codec, enable_voice_boundary_detection) self.tch_f_pdu_to_tagged_stream = blocks.pdu_to_tagged_stream(blocks.byte_t, "packet_len") self.tch_f_file_sink = blocks.file_sink(gr.sizeof_char*1, speech_file, False) @@ -317,6 +319,8 @@ if __name__ == '__main__': "Valid options are " + ", ".join(tch_codecs.keys())) tch_options.add_option("-o", "--output-tch", dest="speech_output_file", default="/tmp/speech.au.gsm", help="TCH/F speech output file [default=%default].") + tch_options.add_option("--voice-boundary", dest="enable_voice_boundary_detection", action="store_true", + help="Enable voice boundary detection for traffic channels. This can help reduce noice in the output.") parser.add_option_group(tch_options) # parse @@ -378,6 +382,7 @@ if __name__ == '__main__': cfile=options.cfile, fc=fc, samp_rate=options.samp_rate, a5=options.a5, a5_kc=kc, speech_file=options.speech_output_file, speech_codec=tch_codecs.get(options.speech_codec), + enable_voice_boundary_detection=options.enable_voice_boundary_detection, verbose=options.verbose, print_bursts=options.print_bursts, ppm=options.ppm) -- cgit v1.2.3 From e87e955d29495ad240eba876ae2db86851c61cd2 Mon Sep 17 00:00:00 2001 From: Roman Khassraf Date: Sat, 1 Oct 2016 13:00:43 +0200 Subject: #208: fixed samp_rate variable --- apps/helpers/grgsm_capture.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'apps') diff --git a/apps/helpers/grgsm_capture.py b/apps/helpers/grgsm_capture.py index caea805..a0a2b8c 100755 --- a/apps/helpers/grgsm_capture.py +++ b/apps/helpers/grgsm_capture.py @@ -86,7 +86,7 @@ class grgsm_capture(gr.top_block): fc=fc, samp_rate_in=samp_rate, ) - self.gsm_clock_offset_control = grgsm.clock_offset_control(fc-shiftoff, sample_rate, osr=4) + self.gsm_clock_offset_control = grgsm.clock_offset_control(fc-shiftoff, samp_rate, osr=4) if self.burst_file: self.gsm_burst_file_sink = grgsm.burst_file_sink(self.burst_file) -- cgit v1.2.3 From 1245b223a887fff6096d3d49f4a41d6ad64110ed Mon Sep 17 00:00:00 2001 From: Roman Khassraf Date: Sat, 1 Oct 2016 13:13:05 +0200 Subject: #208: Fixed port names of offset control and input --- apps/helpers/grgsm_capture.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'apps') diff --git a/apps/helpers/grgsm_capture.py b/apps/helpers/grgsm_capture.py index a0a2b8c..a71c2c8 100755 --- a/apps/helpers/grgsm_capture.py +++ b/apps/helpers/grgsm_capture.py @@ -115,7 +115,7 @@ class grgsm_capture(gr.top_block): if self.verbose or self.burst_file: self.connect((self.gsm_input, 0), (self.gsm_receiver, 0)) self.connect((self.blocks_rotator, 0), (self.gsm_input, 0)) - self.msg_connect(self.gsm_clock_offset_control, "ppm", self.gsm_input, "ppm_in") + self.msg_connect(self.gsm_clock_offset_control, "ctrl", self.gsm_input, "ctrl_in") self.msg_connect(self.gsm_receiver, "measurements", self.gsm_clock_offset_control, "measurements") if self.burst_file: -- cgit v1.2.3 From a5f5a315598a1f835abbb7e61a178979b8811812 Mon Sep 17 00:00:00 2001 From: Roman Khassraf Date: Sun, 20 Nov 2016 22:11:46 +0100 Subject: Fixes incorrect arguments in wideband_scanner --- apps/grgsm_scanner | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'apps') diff --git a/apps/grgsm_scanner b/apps/grgsm_scanner index acd48d9..1688310 100755 --- a/apps/grgsm_scanner +++ b/apps/grgsm_scanner @@ -220,7 +220,7 @@ class wideband_scanner(gr.top_block): # correction of central frequency # if the receiver has large frequency offset # the value of this variable should be set close to that offset in ppm - self.rtlsdr_source.set_freq_corr(options.ppm, 0) + self.rtlsdr_source.set_freq_corr(ppm, 0) self.rtlsdr_source.set_dc_offset_mode(2, 0) self.rtlsdr_source.set_iq_balance_mode(0, 0) @@ -230,7 +230,7 @@ class wideband_scanner(gr.top_block): self.head = blocks.head(gr.sizeof_gr_complex * 1, int(rec_len * sample_rate)) # shift again by -0.1MHz in order to align channel center in 0Hz - self.blocks_rotator_cc = blocks.rotator_cc(-2 * pi * 0.1e6 / options.samp_rate) + self.blocks_rotator_cc = blocks.rotator_cc(-2 * pi * 0.1e6 / sample_rate) self.wideband_receiver = wideband_receiver(OSR=4, fc=carrier_frequency, samp_rate=sample_rate) self.gsm_extract_system_info = grgsm.extract_system_info() -- cgit v1.2.3