diff options
Diffstat (limited to 'gr-vocoder/python')
-rw-r--r-- | gr-vocoder/python/.gitignore | 9 | ||||
-rw-r--r-- | gr-vocoder/python/Makefile.am | 42 | ||||
-rw-r--r-- | gr-vocoder/python/__init__.py | 10 | ||||
-rw-r--r-- | gr-vocoder/python/cvsd.py | 12 | ||||
-rwxr-xr-x | gr-vocoder/python/qa_alaw_vocoder.py | 12 | ||||
-rwxr-xr-x | gr-vocoder/python/qa_codec2_vocoder.py | 14 | ||||
-rwxr-xr-x | gr-vocoder/python/qa_cvsd_vocoder.py | 26 | ||||
-rwxr-xr-x | gr-vocoder/python/qa_g721_vocoder.py | 12 | ||||
-rwxr-xr-x | gr-vocoder/python/qa_g723_24_vocoder.py | 12 | ||||
-rwxr-xr-x | gr-vocoder/python/qa_g723_40_vocoder.py | 12 | ||||
-rwxr-xr-x | gr-vocoder/python/qa_gsm_full_rate.py | 10 | ||||
-rwxr-xr-x | gr-vocoder/python/qa_ulaw_vocoder.py | 12 | ||||
-rw-r--r-- | gr-vocoder/python/run_tests.in | 10 |
13 files changed, 66 insertions, 127 deletions
diff --git a/gr-vocoder/python/.gitignore b/gr-vocoder/python/.gitignore deleted file mode 100644 index bf03975bb..000000000 --- a/gr-vocoder/python/.gitignore +++ /dev/null @@ -1,9 +0,0 @@ -/Makefile -/Makefile.in -/.deps -/.libs -/*.la -/*.lo -/*.pyc -/*.pyo -/run_tests diff --git a/gr-vocoder/python/Makefile.am b/gr-vocoder/python/Makefile.am deleted file mode 100644 index 4b6146ca7..000000000 --- a/gr-vocoder/python/Makefile.am +++ /dev/null @@ -1,42 +0,0 @@ -# -# Copyright 2011 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# GNU Radio is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GNU Radio is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Radio; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, -# Boston, MA 02110-1301, USA. -# - -include $(top_srcdir)/Makefile.common - -vocoderdir = $(grpythondir)/vocoder - -TESTS = run_tests - -noinst_PYTHON = \ - qa_alaw_vocoder.py \ - qa_codec2_vocoder.py \ - qa_cvsd_vocoder.py \ - qa_g721_vocoder.py \ - qa_g723_24_vocoder.py \ - qa_g723_40_vocoder.py \ - qa_gsm_full_rate.py \ - qa_ulaw_vocoder.py - -vocoder_PYTHON = \ - __init__.py \ - cvsd.py - -EXTRA_DIST += run_tests.in diff --git a/gr-vocoder/python/__init__.py b/gr-vocoder/python/__init__.py index c5477b2be..ba5862f8d 100644 --- a/gr-vocoder/python/__init__.py +++ b/gr-vocoder/python/__init__.py @@ -1,23 +1,23 @@ # # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# ''' This is the gr-vocoder package. This package includes the various diff --git a/gr-vocoder/python/cvsd.py b/gr-vocoder/python/cvsd.py index 27b06ddeb..e9b3ee305 100644 --- a/gr-vocoder/python/cvsd.py +++ b/gr-vocoder/python/cvsd.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2007,2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# from gnuradio import gr import vocoder_swig @@ -32,7 +32,7 @@ class cvsd_encode_fb(gr.hier_block2): The incoming sampling rate can be anything, though, of course, the higher the sampling rate and the higher the interpolation rate are, the better the sound quality. ''' - + def __init__(self, resample=8, bw=0.5): ''' When using the CVSD vocoder, appropriate sampling rates are from 8k to 64k with resampling rates diff --git a/gr-vocoder/python/qa_alaw_vocoder.py b/gr-vocoder/python/qa_alaw_vocoder.py index b7b937138..07d0feb58 100755 --- a/gr-vocoder/python/qa_alaw_vocoder.py +++ b/gr-vocoder/python/qa_alaw_vocoder.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# from gnuradio import gr, gr_unittest from vocoder_swig import * @@ -27,7 +27,7 @@ class test_alaw_vocoder (gr_unittest.TestCase): def setUp (self): self.tb = gr.top_block() - + def tearDown (self): self.tb = None diff --git a/gr-vocoder/python/qa_codec2_vocoder.py b/gr-vocoder/python/qa_codec2_vocoder.py index 699bb7dda..2f707b311 100755 --- a/gr-vocoder/python/qa_codec2_vocoder.py +++ b/gr-vocoder/python/qa_codec2_vocoder.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# from gnuradio import gr, gr_unittest from vocoder_swig import * @@ -27,13 +27,13 @@ class test_codec2_vocoder (gr_unittest.TestCase): def setUp (self): self.tb = gr.top_block() - + def tearDown (self): self.tb = None def test001_module_load (self): raw_enc = codec2_encode_sp(); raw_dec = codec2_decode_ps(); - + if __name__ == '__main__': gr_unittest.run(test_codec2_vocoder, "test_codec2_vocoder.xml") diff --git a/gr-vocoder/python/qa_cvsd_vocoder.py b/gr-vocoder/python/qa_cvsd_vocoder.py index 53045e4a9..573e6a130 100755 --- a/gr-vocoder/python/qa_cvsd_vocoder.py +++ b/gr-vocoder/python/qa_cvsd_vocoder.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2007,2010,2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# from gnuradio import gr, gr_unittest from vocoder_swig import * @@ -28,7 +28,7 @@ class test_cvsd_vocoder (gr_unittest.TestCase): def setUp (self): self.tb = gr.top_block() - + def tearDown (self): self.tb = None @@ -98,26 +98,26 @@ class test_cvsd_vocoder (gr_unittest.TestCase): src = gr.sig_source_f(sample_rate, gr.GR_SIN_WAVE, 200, 1, 0) head = gr.head(gr.sizeof_float, 100) src_scale = gr.multiply_const_ff(scale_factor) - + interp = blks2.rational_resampler_fff(8, 1) f2s = gr.float_to_short () - + enc = cvsd_vocoder.encode_sb() dec = cvsd_vocoder.decode_bs() - + s2f = gr.short_to_float () decim = blks2.rational_resampler_fff(1, 8) - + sink_scale = gr.multiply_const_ff(1.0/scale_factor) sink = gr.vector_sink_f() - + self.tb.connect(src, src_scale, interp, f2s, enc) self.tb.connect(enc, dec, s2f, decim, sink_scale, head, sink) self.tb.run() print sink.data() - + self.assertFloatTuplesAlmostEqual (expected_data, sink.data(), 5) """ - + if __name__ == '__main__': gr_unittest.run(test_cvsd_vocoder, "test_cvsd_vocoder.xml") diff --git a/gr-vocoder/python/qa_g721_vocoder.py b/gr-vocoder/python/qa_g721_vocoder.py index 79cc944f3..26fcea789 100755 --- a/gr-vocoder/python/qa_g721_vocoder.py +++ b/gr-vocoder/python/qa_g721_vocoder.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# from gnuradio import gr, gr_unittest from vocoder_swig import * @@ -27,7 +27,7 @@ class test_g721_vocoder (gr_unittest.TestCase): def setUp (self): self.tb = gr.top_block() - + def tearDown (self): self.tb = None diff --git a/gr-vocoder/python/qa_g723_24_vocoder.py b/gr-vocoder/python/qa_g723_24_vocoder.py index ccf215f46..be95a8d94 100755 --- a/gr-vocoder/python/qa_g723_24_vocoder.py +++ b/gr-vocoder/python/qa_g723_24_vocoder.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# from gnuradio import gr, gr_unittest from vocoder_swig import * @@ -27,7 +27,7 @@ class test_g723_24_vocoder (gr_unittest.TestCase): def setUp (self): self.tb = gr.top_block() - + def tearDown (self): self.tb = None diff --git a/gr-vocoder/python/qa_g723_40_vocoder.py b/gr-vocoder/python/qa_g723_40_vocoder.py index 9e6a52339..abbb4079a 100755 --- a/gr-vocoder/python/qa_g723_40_vocoder.py +++ b/gr-vocoder/python/qa_g723_40_vocoder.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# from gnuradio import gr, gr_unittest from vocoder_swig import * @@ -27,7 +27,7 @@ class test_g723_40_vocoder (gr_unittest.TestCase): def setUp (self): self.tb = gr.top_block() - + def tearDown (self): self.tb = None diff --git a/gr-vocoder/python/qa_gsm_full_rate.py b/gr-vocoder/python/qa_gsm_full_rate.py index f9125905c..2e551e193 100755 --- a/gr-vocoder/python/qa_gsm_full_rate.py +++ b/gr-vocoder/python/qa_gsm_full_rate.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2004,2007,2010 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# from gnuradio import gr, gr_unittest import vocoder_swig diff --git a/gr-vocoder/python/qa_ulaw_vocoder.py b/gr-vocoder/python/qa_ulaw_vocoder.py index 0e201638c..2bc638567 100755 --- a/gr-vocoder/python/qa_ulaw_vocoder.py +++ b/gr-vocoder/python/qa_ulaw_vocoder.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# from gnuradio import gr, gr_unittest from vocoder_swig import * @@ -27,7 +27,7 @@ class test_ulaw_vocoder (gr_unittest.TestCase): def setUp (self): self.tb = gr.top_block() - + def tearDown (self): self.tb = None diff --git a/gr-vocoder/python/run_tests.in b/gr-vocoder/python/run_tests.in deleted file mode 100644 index e0c61a6b4..000000000 --- a/gr-vocoder/python/run_tests.in +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh - -# 1st parameter is absolute path to component source directory -# 2nd parameter is absolute path to component build directory -# 3rd parameter is path to Python QA directory - -@top_builddir@/run_tests.sh \ - @abs_top_srcdir@/gr-vocoder \ - @abs_top_builddir@/gr-vocoder \ - @srcdir@ |