{
"info": {
"author": "Antony Chazapis",
"author_email": "chazapis@gmail.com",
"bugtrack_url": null,
"classifiers": [
"Environment :: Console",
"License :: OSI Approved :: GNU General Public License v2 (GPLv2)",
"Operating System :: OS Independent",
"Programming Language :: Python :: 2.7",
"Topic :: Communications :: Ham Radio"
],
"description": "# pydv\n\nCollection of Python code to experiment with D-STAR and the proposed [vocoder extension](#d-star-vocoder-extension) that allows the use of the open source [Codec 2](http://www.rowetel.com/codec2.html) with D-STAR.\n\nProvides Python interfaces to manage DExtra and DPlus connections (protocols used by reflectors), convert from network data to D-STAR streams (header and frames) and vice versa, as well as encode and decode voice data using [mbelib](https://github.com/szechyjs/mbelib) (decode only) and [codec2](https://svn.code.sf.net/p/freetel/code/codec2/branches/), and transcode using an AMBEd server (the version included in my [xlxd fork](https://github.com/chazapis/xlxd)).\n\nInstalls the following executables:\n* `dv-recorder`, which connects to a reflector and records traffic in .dvtool files\n* `dv-player`, which plays back a .dvtool file to a reflector\n* `dv-encoder`, which converts a .wav fle to a .dvtool file using the Codec 2 vocoder\n* `dv-decoder`, which converts a .dvtool file using any vocoder to .wav\n* `dv-transcoder`, which connects to an AMBEd server and converts a .dvtool file using the AMBE vocoder to a .dvtool file using the Codec 2 vocoder and vice versa\n\n## D-STAR vocoder extension\n\nI propose the use of the \"Flag 3\" byte of the header, to mark the vocoder type in the voice frames, as follows (in accordance to section 2.1.1, page 4 of the [D-STAR specification](https://www.jarl.com/d-star/shogen.pdf)):\n\n| Bit | Meaning | Function |\n| --- | ------- | -------- |\n| `0000000x` | Vocoder | `0`: AMBE (backwards compatible)
`1`: Codec 2 |\n| `000000x1` | Mode | `0`: Codec 2 3200 (160 samples/20 ms into 64 bits)
`1`: Codec 2 2400 (160 samples/20 ms into 48 bits) plus FEC (22 bits) |\n| `00000100` to `11111111` | Undefined | Use for future expansion |\n\n_The total space available in the frame for voice data is 72 bits. With Codec 2 3200, there is not much space left for FEC, so this option should only be used for communications over the Internet. On the other hand, using Codec 2 2400, allows us to protect the first 24 bits of the voice data with two applications of the (23, 12) Golay code._\n\n_Note: An early version of the extension used one more bit to control the presence of FEC. It was later decided to always include FEC when there is available space in the frame._\n\nThe vocoder extension is compatible with all current D-STAR hardware (repeaters, hotspots, etc.) and software (repeater controllers, reflectors, etc.), except - of course - transceivers that assume voice data to be in AMBE format and use the corresponding chip for processing.\n\nD-STAR reflectors, like [xlxd](https://github.com/LX3JL/xlxd), can be used to transcode and bridge the two formats. Although implementations of the vocoder extension can use the same reflector connections as AMBE-only clients, it should be avoided, to save the user confusion and establish interoperability.\n\nThe solution implemented in the `vocoder-extension` branch of my [xlxd fork](https://github.com/chazapis/xlxd) uses another DExtra listener on a different port (30201 instead of 30001). The new port is to be used by reflectors using the \"ORF\" prefix (Open ReFlector). Any client connected to an ORF reflector will receive streams encoded with Codec 2. All other D-STAR protocol handlers will still send out data encoded with AMBE. Note that the protocol/port only affects data transmitted by the reflector. The stream vocoder is recognized by all protocol handlers, so a client can still transmit data using any vocoder on any port. The rationale behind this is that DExtra links may be used by repeaters or other reflectors, so it is not really possible to know what their clients support. So, nothing will change when linking a repeater to an XRF reflector, but will do when linking to an ORF one.\n\nThe open source vocoder, allows homebrewing transceivers using a [Rasbperry Pi](https://www.raspberrypi.org), an [MMDVM modem](https://github.com/g4klx/MMDVM) (even [one constructed with through-hole components](https://www.florian-wolters.de/blog/2016/02/25/handcrafted-mmdvm-adapter/)), and an old radio. Thus, one could use a D-STAR hotspot as a transceiver, assuming a method to attach a microphone and speaker. It also allows using software clients to communicate through reflectors without the need of any AMBE hardware.\n\nAll included utilities implement the vocoder extension. Use the `-p dextraopen` flag, or substitude the reflector's callsign prefix with \"ORF\", to make `dv-player` and `dv-recorder` use the \"open\" DExtra port.\n\n## Building\n\nTo build, you must first build and install [mbelib](https://github.com/szechyjs/mbelib) and [codec2](https://svn.code.sf.net/p/freetel/code/codec2/branches/).\n\nOn Mac OS X, I used [MacPorts](https://www.macports.org) to install `cmake`, `speexDSP`, and `libsamplerate`. [mbelib](https://github.com/szechyjs/mbelib) compiles and installs to `/usr/local` without problems. To build [codec2](https://svn.code.sf.net/p/freetel/code/codec2/branches/), I had to `export LIBRARY_PATH=$LIBRARY_PATH:/opt/local/lib` before running `make`, and edit the following files to remove unsupported `gcc` flags (from the `build` folder):\n* `unittest/CMakeFiles/ofdm_stack.dir/flags.make`, to remove `-fstack-usage`\n* `unittest/CMakeFiles/ofdm_stack.dir/link.txt`, to remove `-Wl,-Map=ofdm_stack.map`\n\n---\n\nBased on [ircDDBGateway](https://github.com/g4klx/ircDDBGateway) and [xlxd](https://github.com/LX3JL/xlxd). Tested with my [xlxd fork](https://github.com/chazapis/xlxd).\n\n73 de SV9OAN",
"description_content_type": "text/markdown",
"docs_url": null,
"download_url": "",
"downloads": {
"last_day": -1,
"last_month": -1,
"last_week": -1
},
"home_page": "https://github.com/chazapis/pydv",
"keywords": "",
"license": "GPLv2",
"maintainer": "",
"maintainer_email": "",
"name": "pydv",
"package_url": "https://pypi.org/project/pydv/",
"platform": "",
"project_url": "https://pypi.org/project/pydv/",
"project_urls": {
"Homepage": "https://github.com/chazapis/pydv"
},
"release_url": "https://pypi.org/project/pydv/2.0/",
"requires_dist": null,
"requires_python": "",
"summary": "D-STAR library and utilities in Python",
"version": "2.0"
},
"last_serial": 5105498,
"releases": {
"0.1": [
{
"comment_text": "",
"digests": {
"md5": "e392293325d95b9953de0d06eadc22bc",
"sha256": "cafedf668d7803190802eb6d7d9adb3451f2b38b4fd7950f13302ca848f916b3"
},
"downloads": -1,
"filename": "pydv-0.1-py2-none-any.whl",
"has_sig": false,
"md5_digest": "e392293325d95b9953de0d06eadc22bc",
"packagetype": "bdist_wheel",
"python_version": "py2",
"requires_python": null,
"size": 22734,
"upload_time": "2018-12-02T18:09:26",
"url": "https://files.pythonhosted.org/packages/ad/b5/fcc769f7551168aee773c595abdf2fdf18bc9ada9d49d2c84d850c1debd0/pydv-0.1-py2-none-any.whl"
},
{
"comment_text": "",
"digests": {
"md5": "4192698f85d2a960b4376a1a1f70f3e9",
"sha256": "6d8c5cdd476c2596351fdf09c06b5ccb583d865999b7a01b28e2d505cf5579e4"
},
"downloads": -1,
"filename": "pydv-0.1.tar.gz",
"has_sig": false,
"md5_digest": "4192698f85d2a960b4376a1a1f70f3e9",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 9273,
"upload_time": "2018-12-02T18:09:29",
"url": "https://files.pythonhosted.org/packages/a2/68/4b3b129c50e43c9a3bceb4acd4082b2d1d7e794f9db55bb4996cd22ef4c9/pydv-0.1.tar.gz"
}
],
"0.2": [
{
"comment_text": "",
"digests": {
"md5": "715fb162e437f21e0ad7f273f99ef7b3",
"sha256": "3f1c740a3bdca7714839c70de7a79455b1bb90f627635192d82862eb7f294b89"
},
"downloads": -1,
"filename": "pydv-0.2.tar.gz",
"has_sig": false,
"md5_digest": "715fb162e437f21e0ad7f273f99ef7b3",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 16660,
"upload_time": "2018-12-10T11:17:22",
"url": "https://files.pythonhosted.org/packages/77/32/ea81987f0bb1d466f1fa5e7c684f70b3bf2e78f1f9bb058b89fe1e4827c5/pydv-0.2.tar.gz"
}
],
"0.3": [
{
"comment_text": "",
"digests": {
"md5": "7b267fd61ce894f67ddfd2dfef91ea04",
"sha256": "d8773c7242dc1bfb993bb5bee3071756c799eb4c7bf10caa267a39ebe985bc43"
},
"downloads": -1,
"filename": "pydv-0.3.tar.gz",
"has_sig": false,
"md5_digest": "7b267fd61ce894f67ddfd2dfef91ea04",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 17562,
"upload_time": "2018-12-13T20:39:01",
"url": "https://files.pythonhosted.org/packages/99/4b/7cc8a06e9520bf4415543b82b99d54aeae602f34d9b716f57a5a23eff318/pydv-0.3.tar.gz"
}
],
"0.4": [
{
"comment_text": "",
"digests": {
"md5": "8e272c2c3f35cd8fe9f1bdf9b9607c12",
"sha256": "f6169bd556620bffd5a9e277b02f8a8c63a2e3f5d9be6a8837e925e3f8ea6cd1"
},
"downloads": -1,
"filename": "pydv-0.4.tar.gz",
"has_sig": false,
"md5_digest": "8e272c2c3f35cd8fe9f1bdf9b9607c12",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 18708,
"upload_time": "2018-12-15T21:32:12",
"url": "https://files.pythonhosted.org/packages/ea/2e/6df7a068a731e72a27eb96a1e51260c48553e02322d1b43b45ce3599ee7f/pydv-0.4.tar.gz"
}
],
"1.0": [
{
"comment_text": "",
"digests": {
"md5": "0ae1bff9f497166d6859f7c9d67b6965",
"sha256": "9f40b7dbfe5b052c31322751aee0b1494e1e3e42b7da5f7e3cb3c1c70d170987"
},
"downloads": -1,
"filename": "pydv-1.0.tar.gz",
"has_sig": false,
"md5_digest": "0ae1bff9f497166d6859f7c9d67b6965",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 21295,
"upload_time": "2019-02-10T21:07:31",
"url": "https://files.pythonhosted.org/packages/95/6e/61257a1853479276057c82c51bdfb4473fd43e515fb3ac27963b2c1c2119/pydv-1.0.tar.gz"
}
],
"2.0": [
{
"comment_text": "",
"digests": {
"md5": "ae385c1dcd24c83d74f040d13e09f09d",
"sha256": "2322daee0ab23ad913b589faae4d9895524468704e59909b6c3e150841b22efc"
},
"downloads": -1,
"filename": "pydv-2.0.tar.gz",
"has_sig": false,
"md5_digest": "ae385c1dcd24c83d74f040d13e09f09d",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 22288,
"upload_time": "2019-04-05T20:17:36",
"url": "https://files.pythonhosted.org/packages/e5/83/6f37317d91c18e97b2b850da74094df79972f48a3b94e6e5536f98e437d9/pydv-2.0.tar.gz"
}
]
},
"urls": [
{
"comment_text": "",
"digests": {
"md5": "ae385c1dcd24c83d74f040d13e09f09d",
"sha256": "2322daee0ab23ad913b589faae4d9895524468704e59909b6c3e150841b22efc"
},
"downloads": -1,
"filename": "pydv-2.0.tar.gz",
"has_sig": false,
"md5_digest": "ae385c1dcd24c83d74f040d13e09f09d",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 22288,
"upload_time": "2019-04-05T20:17:36",
"url": "https://files.pythonhosted.org/packages/e5/83/6f37317d91c18e97b2b850da74094df79972f48a3b94e6e5536f98e437d9/pydv-2.0.tar.gz"
}
]
}