{ "info": { "author": "Dalen Bernaca", "author_email": "dbernaca@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: GNU General Public License (GPL)", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.5", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "Python bindings (by Dalen Bernaca) for HawkVoice Direct Interface (HVDI) - cross platform network voice library by Phil Frisbie.\n\nThis package allows you to access the low-level functions of HawkVoiceDI and implements\nsome, more Pythonic, higher level, classes and functions to make audio encoding/decoding as easy as possible.\n\nThe library supports the following compressed audio codecs:\n LPC,\n LPC10,\n CELP,\n GSM,\n ADPCM,\n and U-LAW.\n\nThe encoder returns packets ready for UDP transmission (encryption and signing included).\nThe decoder accepts the packets and even keeps track of correct sequence order for you.\n\nInput data are strings of 8000 Hz sample rate, 16bit, mono, linear PCM audio bytes.\nThe minimal length of the input audio chunk that is required depends on the used codec.\nThe library provides you with the Mixer() class that can be used to downsample the data if necessary.\nIt also allows you to mix audio chunks together, perform audio gain control on them, uninterleave left and right channels\nof a stereo input to be used separately and some more useful stuff.\n\nMost simplistic usage possible:\n>>> from hvdi import hvdi\n>>> import wave\n>>> \n>>> inwf = wave.open(\"input-file.wav\", \"r\")\n>>> # We need 16bit audio:\n>>> assert inwf.getsampwidth()==2\n>>> # Get all audio data:\n>>> samples = inwf.readframes(inwf.getnframes())\n>>>\n>>> m = hvdi.Mixer()\n>>> # If file is stereo, turn it to mono by mixing left and right channel together:\n>>> if inwf.getnchannels()==2:\n>>> left, right = m.uninterleave(samples)\n>>> # Downsample to 8000 Hz if needed:\n>>> left = m.resample(left, inwf.getframerate(), 8000)\n>>> right = m.resample(right, inwf.getframerate(), 8000)\n>>> samples = m.mix(left, right)\n>>> else:\n>>> # Downsample to 8000 Hz if needed:\n>>> samples = m.resample(samples, inwf.getframerate(), 8000)\n>>> inwf.close()\n>>>\n>>> # Exercise gain control, just for fun of it:\n>>> samples = m.agc(samples, 0.85)\n>>>\n>>> # Ow, we probably could have skipped boring stuff above and assume the wave file is of the right format!\n>>> # But now, let us reencode the input file.\n>>> # Encode it to GSM and decode from it to hear how it sounds:\n>>> # I already told you that it is simple.\n>>> outwf = wave.open(\"output-file.wav\", \"w\")\n>>> outwf.setnchannels(1)\n>>> outwf.setsampwidth(2)\n>>> outwf.setframerate(8000)\n>>>\n>>> hvdi.Decode(\n>>> hvdi.IterEncode(samples, \"GSM\"),\n>>> outstream=outwf)\n>>> outwf.close()\n>>>\n\nHawkVoiceDI has been tested on the following platforms:\n Win32 (9x, ME, NT 4.0, 2000, XP, CE)\n Linux (various flavors).\n\nThe PyHVDI is prepared for:\n Linux and MS Windows for now,\nand is tested on the following platforms:\n Ubuntu 14.04,\n Raspbian Stretch,\n Windows XP and on\n Cygwin running on Windows XP.", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://brailleweb.com/cgi-bin/python.py?module=PyHVDI", "keywords": "HawkVoice,HawkVoiceDI,HVDI,audio codecs,encoding,decoding,GSM,LPC,LPC10,CELP,ADPCM,ULAW,U-Law", "license": "GPL", "maintainer": "", "maintainer_email": "", "name": "PyHVDI", "package_url": "https://pypi.org/project/PyHVDI/", "platform": "", "project_url": "https://pypi.org/project/PyHVDI/", "project_urls": { "Homepage": "http://brailleweb.com/cgi-bin/python.py?module=PyHVDI" }, "release_url": "https://pypi.org/project/PyHVDI/1.0/", "requires_dist": null, "requires_python": "", "summary": "Python bindings for HawkVoice Direct Interface (HVDI) - cross platform network voice library", "version": "1.0" }, "last_serial": 4235729, "releases": { "1.0": [ { "comment_text": "", "digests": { "md5": "89c2cf2462c3ddc298511a561e99c859", "sha256": "80a76827ac954cb0ede1ec83d22959b948d774c47a3a856043c43a222f47e722" }, "downloads": -1, "filename": "PyHVDI-1.0.zip", "has_sig": false, "md5_digest": "89c2cf2462c3ddc298511a561e99c859", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 472667, "upload_time": "2018-09-03T22:32:16", "url": "https://files.pythonhosted.org/packages/5b/83/83378ec16f1cd4658519c37f94247e1b4b0d3b209021254ccc970c048714/PyHVDI-1.0.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "89c2cf2462c3ddc298511a561e99c859", "sha256": "80a76827ac954cb0ede1ec83d22959b948d774c47a3a856043c43a222f47e722" }, "downloads": -1, "filename": "PyHVDI-1.0.zip", "has_sig": false, "md5_digest": "89c2cf2462c3ddc298511a561e99c859", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 472667, "upload_time": "2018-09-03T22:32:16", "url": "https://files.pythonhosted.org/packages/5b/83/83378ec16f1cd4658519c37f94247e1b4b0d3b209021254ccc970c048714/PyHVDI-1.0.zip" } ] }