Name | audio-processer JSON |
Version |
0.1.0
JSON |
| download |
home_page | None |
Summary | A Python package for audio recording and transcribing |
upload_time | 2024-08-21 13:36:58 |
maintainer | None |
docs_url | None |
author | Jesse Wei |
requires_python | <4.0,>=3.12 |
license | None |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# audio_processer
A Python package for recording and transcribing audio.
- [audio\_processer](#audio_processer)
- [Installation](#installation)
- [Usage](#usage)
- [AudioRecorder](#audiorecorder)
- [Example: start recording](#example-start-recording)
- [Example: pause/resume recording](#example-pauseresume-recording)
- [Example: stop recording](#example-stop-recording)
- [AudioTranscriber](#audiotranscriber)
- [Example: Local whisper model and single audio file](#example-local-whisper-model-and-single-audio-file)
- [Example: Local whisper model and multiple audio file](#example-local-whisper-model-and-multiple-audio-file)
- [Example: Calling OpenAI API](#example-calling-openai-api)
- [Example: Using another model](#example-using-another-model)
## Installation
```bash
pip install audio_processer
```
## Usage
The package contains two classes: `AudioRecorder` and `AudioTranscriber`.
### AudioRecorder
#### Example: start recording
```python
recorder = AudioRecorder()
recorder.start_recording()
```
#### Example: pause/resume recording
```python
recorder = AudioRecorder()
recorder.toggle_recording()
```
#### Example: stop recording
```python
recorder = AudioRecorder()
recorder.stop_recording()
```
### AudioTranscriber
Before getting started, make sure you have already obtained an API key on OpenAI. If you have not done so, follow [this guide](https://platform.openai.com/docs/quickstart/create-and-export-an-api-key) to create one.
#### Example: Local whisper model and single audio file
```python
# Transcribe using local whisper model, which is the default
transcriber = AudioTranscriber('audio_1.wav')
transcriber.transcribe()
print(transcriber.texts)
```
#### Example: Local whisper model and multiple audio file
```python
# You can pass multiple audio files for transcribing
transcriber = AudioTranscriber('audio_1.wav', 'audio_2.wav')
transcriber.transcribe()
print(transcriber.texts)
```
#### Example: Calling OpenAI API
*Note: API usage fee applies.*
```python
# You can pass multiple audio files for transcribing
transcriber = AudioTranscriber('audio_1.wav', 'audio_2.wav', mode='remote')
transcriber.transcribe()
print(transcriber.texts)
```
#### Example: Using another model
*Note: this only applies when local whisper model is used*
```python
# Default is tiny.en
transcriber = AudioTranscriber('audio_1.wav', 'audio_2.wav', mode='local', model='base.en')
transcriber.transcribe()
print(transcriber.texts)
```
Raw data
{
"_id": null,
"home_page": null,
"name": "audio-processer",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.12",
"maintainer_email": null,
"keywords": null,
"author": "Jesse Wei",
"author_email": "jesseweijapan@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/72/e9/9635a643e58ea53155ef625cceeab1cd0b0d8f03a697fd49c80aa8eecc4c/audio_processer-0.1.0.tar.gz",
"platform": null,
"description": "# audio_processer\n\nA Python package for recording and transcribing audio.\n\n- [audio\\_processer](#audio_processer)\n - [Installation](#installation)\n - [Usage](#usage)\n - [AudioRecorder](#audiorecorder)\n - [Example: start recording](#example-start-recording)\n - [Example: pause/resume recording](#example-pauseresume-recording)\n - [Example: stop recording](#example-stop-recording)\n - [AudioTranscriber](#audiotranscriber)\n - [Example: Local whisper model and single audio file](#example-local-whisper-model-and-single-audio-file)\n - [Example: Local whisper model and multiple audio file](#example-local-whisper-model-and-multiple-audio-file)\n - [Example: Calling OpenAI API](#example-calling-openai-api)\n - [Example: Using another model](#example-using-another-model)\n\n## Installation\n\n```bash\npip install audio_processer\n```\n\n## Usage\n\nThe package contains two classes: `AudioRecorder` and `AudioTranscriber`.\n\n### AudioRecorder\n\n#### Example: start recording\n\n```python\nrecorder = AudioRecorder()\nrecorder.start_recording()\n```\n\n#### Example: pause/resume recording\n\n```python\nrecorder = AudioRecorder()\nrecorder.toggle_recording()\n```\n\n#### Example: stop recording\n\n```python\nrecorder = AudioRecorder()\nrecorder.stop_recording()\n```\n\n### AudioTranscriber\n\nBefore getting started, make sure you have already obtained an API key on OpenAI. If you have not done so, follow [this guide](https://platform.openai.com/docs/quickstart/create-and-export-an-api-key) to create one.\n\n#### Example: Local whisper model and single audio file\n\n```python\n# Transcribe using local whisper model, which is the default\ntranscriber = AudioTranscriber('audio_1.wav')\ntranscriber.transcribe()\nprint(transcriber.texts)\n```\n\n#### Example: Local whisper model and multiple audio file\n\n```python\n# You can pass multiple audio files for transcribing\ntranscriber = AudioTranscriber('audio_1.wav', 'audio_2.wav')\ntranscriber.transcribe()\nprint(transcriber.texts)\n```\n\n#### Example: Calling OpenAI API\n\n*Note: API usage fee applies.*\n\n```python\n# You can pass multiple audio files for transcribing\ntranscriber = AudioTranscriber('audio_1.wav', 'audio_2.wav', mode='remote')\ntranscriber.transcribe()\nprint(transcriber.texts)\n```\n\n#### Example: Using another model\n\n*Note: this only applies when local whisper model is used*\n\n```python\n# Default is tiny.en\ntranscriber = AudioTranscriber('audio_1.wav', 'audio_2.wav', mode='local', model='base.en')\ntranscriber.transcribe()\nprint(transcriber.texts)\n```\n\n",
"bugtrack_url": null,
"license": null,
"summary": "A Python package for audio recording and transcribing",
"version": "0.1.0",
"project_urls": null,
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "704e9f61a30c4092f3f643f6da93d3dbddd6d002a91fa6c34c5513b8988533a8",
"md5": "dc0b2be836bcd7f4380930d66091e455",
"sha256": "503f547dedd654632f845662e06e5349aeb5f81eeaa4c98df8cdbe29f81d1f81"
},
"downloads": -1,
"filename": "audio_processer-0.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "dc0b2be836bcd7f4380930d66091e455",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.12",
"size": 4314,
"upload_time": "2024-08-21T13:36:57",
"upload_time_iso_8601": "2024-08-21T13:36:57.237673Z",
"url": "https://files.pythonhosted.org/packages/70/4e/9f61a30c4092f3f643f6da93d3dbddd6d002a91fa6c34c5513b8988533a8/audio_processer-0.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "72e99635a643e58ea53155ef625cceeab1cd0b0d8f03a697fd49c80aa8eecc4c",
"md5": "9a23aaf1c180d8ab208d81ae160e157a",
"sha256": "29670312d2ec26e676372e292806157ce0183862f847f14e13f1c80e4917b7f7"
},
"downloads": -1,
"filename": "audio_processer-0.1.0.tar.gz",
"has_sig": false,
"md5_digest": "9a23aaf1c180d8ab208d81ae160e157a",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.12",
"size": 3395,
"upload_time": "2024-08-21T13:36:58",
"upload_time_iso_8601": "2024-08-21T13:36:58.775616Z",
"url": "https://files.pythonhosted.org/packages/72/e9/9635a643e58ea53155ef625cceeab1cd0b0d8f03a697fd49c80aa8eecc4c/audio_processer-0.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-08-21 13:36:58",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "audio-processer"
}