WebSpeechRecognition


NameWebSpeechRecognition JSON
Version 0.1.4 PyPI version JSON
download
home_pageNone
SummaryA Python library for speech-to-text integration using Selenium WebDriver.
upload_time2024-12-13 12:04:02
maintainerNone
docs_urlNone
authorArnav Singh
requires_python>=3.7
licenseNone
keywords python speech recognition speech recognition stt selenium speech-to-text selenium voice recognition voice interaction multilingual multilingual support chromedriver
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # WebSpeechRecognition Library

## Introduction

WebSpeechRecognition is a Python library that helps turn speech into text in real time. It uses the Selenium WebDriver and the HTML5 Web Speech API. This tool is built to work with Chrome WebDriver and is easy to use for speech recognition tasks.



## Installation

To install WebSpeechRecognition, you can use pip:

```bash
pip install WebSpeechRecognition
```

## Features

- **Works in Many Languages:** You can set the language you want using simple codes like "en-US" for English.
- **Change Language Easily:** You can pick a language at any time while using it.
- **Simple Functions:** It has easy-to-understand methods to start and stop speech recognition.

## Usage

### Initialization

To start using WebSpeechRecognition, initialize the `SpeechRecognition` class with the path to your ChromeDriver executable and the language code:

```python
from WebSpeechRecognition import SpeechRecognition

recognizer = SpeechRecognition("path/to/chromedriver", language="en-US")
recognizer.Init()
```

### Speech Recognition

To start listening and transcribing speech, use the `Listen` method. This method returns the transcribed text:

```python
text = recognizer.Listen(print_allowed=True)
print(f"You said: {text}")
```

### Close the Driver

Once you are done, use the `Quit` method to close the ChromeDriver instance:

```python
recognizer.Quit()
```

## Examples

Here is a complete example:

```python
from WebSpeechRecognition import SpeechRecognition

recognizer = SpeechRecognition("path/to/chromedriver", language="en-US")
recognizer.Init()

while True:
    try:
        text = recognizer.Listen(print_allowed=True)
        print(f"You said: {text}")
    except KeyboardInterrupt:
        recognizer.Quit()
        break
```



## Parameters

### `SpeechRecognition(driver_path, language)`
- `driver_path`: The path to the Chrome WebDriver file.
- `language`: The language code for recognition (default: "en-US").

### `Init()`
Sets up the WebDriver with options for speech recognition.

### `Listen(print_allowed=False)`
Starts listening and returns the text it hears.
- `print_allowed`: If True, prints recognized text to the console.

### `Quit()`
Stops the WebDriver and closes everything.



## Contributing
We welcome contributions! If you find a bug or have an idea for a new feature, feel free to open an issue or a pull request on our GitHub repository.

Want to help improve SpeechRecognition? Here's how:

1. Fork the repository.
2. Make a new branch (`git checkout -b feature-branch`).
3. Add your changes (`git commit -m 'Add feature'`).
4. Push your branch (`git push origin feature-branch`).
5. Open a pull request for review.


## License

This project uses the MIT License. See the `LICENSE` file for details.



## Contact

Have questions or suggestions? Contact us:

- Email: authentic.arnav@gmail.com





            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "WebSpeechRecognition",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": null,
    "keywords": "python, speech, recognition, speech recognition, stt, selenium, speech-to-text, selenium, voice recognition, voice interaction, multilingual, multilingual support, chromedriver",
    "author": "Arnav Singh",
    "author_email": "authentic.arnav@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/d4/c3/295d46683cd169df97eb461541b3aa897cc3210b4f2c5d4fe00bb4fc3511/WebSpeechRecognition-0.1.4.tar.gz",
    "platform": null,
    "description": "# WebSpeechRecognition Library\r\n\r\n## Introduction\r\n\r\nWebSpeechRecognition is a Python library that helps turn speech into text in real time. It uses the Selenium WebDriver and the HTML5 Web Speech API. This tool is built to work with Chrome WebDriver and is easy to use for speech recognition tasks.\r\n\r\n\r\n\r\n## Installation\r\n\r\nTo install WebSpeechRecognition, you can use pip:\r\n\r\n```bash\r\npip install WebSpeechRecognition\r\n```\r\n\r\n## Features\r\n\r\n- **Works in Many Languages:** You can set the language you want using simple codes like \"en-US\" for English.\r\n- **Change Language Easily:** You can pick a language at any time while using it.\r\n- **Simple Functions:** It has easy-to-understand methods to start and stop speech recognition.\r\n\r\n## Usage\r\n\r\n### Initialization\r\n\r\nTo start using WebSpeechRecognition, initialize the `SpeechRecognition` class with the path to your ChromeDriver executable and the language code:\r\n\r\n```python\r\nfrom WebSpeechRecognition import SpeechRecognition\r\n\r\nrecognizer = SpeechRecognition(\"path/to/chromedriver\", language=\"en-US\")\r\nrecognizer.Init()\r\n```\r\n\r\n### Speech Recognition\r\n\r\nTo start listening and transcribing speech, use the `Listen` method. This method returns the transcribed text:\r\n\r\n```python\r\ntext = recognizer.Listen(print_allowed=True)\r\nprint(f\"You said: {text}\")\r\n```\r\n\r\n### Close the Driver\r\n\r\nOnce you are done, use the `Quit` method to close the ChromeDriver instance:\r\n\r\n```python\r\nrecognizer.Quit()\r\n```\r\n\r\n## Examples\r\n\r\nHere is a complete example:\r\n\r\n```python\r\nfrom WebSpeechRecognition import SpeechRecognition\r\n\r\nrecognizer = SpeechRecognition(\"path/to/chromedriver\", language=\"en-US\")\r\nrecognizer.Init()\r\n\r\nwhile True:\r\n    try:\r\n        text = recognizer.Listen(print_allowed=True)\r\n        print(f\"You said: {text}\")\r\n    except KeyboardInterrupt:\r\n        recognizer.Quit()\r\n        break\r\n```\r\n\r\n\r\n\r\n## Parameters\r\n\r\n### `SpeechRecognition(driver_path, language)`\r\n- `driver_path`: The path to the Chrome WebDriver file.\r\n- `language`: The language code for recognition (default: \"en-US\").\r\n\r\n### `Init()`\r\nSets up the WebDriver with options for speech recognition.\r\n\r\n### `Listen(print_allowed=False)`\r\nStarts listening and returns the text it hears.\r\n- `print_allowed`: If True, prints recognized text to the console.\r\n\r\n### `Quit()`\r\nStops the WebDriver and closes everything.\r\n\r\n\r\n\r\n## Contributing\r\nWe welcome contributions! If you find a bug or have an idea for a new feature, feel free to open an issue or a pull request on our GitHub repository.\r\n\r\nWant to help improve SpeechRecognition? Here's how:\r\n\r\n1. Fork the repository.\r\n2. Make a new branch (`git checkout -b feature-branch`).\r\n3. Add your changes (`git commit -m 'Add feature'`).\r\n4. Push your branch (`git push origin feature-branch`).\r\n5. Open a pull request for review.\r\n\r\n\r\n## License\r\n\r\nThis project uses the MIT License. See the `LICENSE` file for details.\r\n\r\n\r\n\r\n## Contact\r\n\r\nHave questions or suggestions? Contact us:\r\n\r\n- Email: authentic.arnav@gmail.com\r\n\r\n\r\n\r\n\r\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "A Python library for speech-to-text integration using Selenium WebDriver.",
    "version": "0.1.4",
    "project_urls": null,
    "split_keywords": [
        "python",
        " speech",
        " recognition",
        " speech recognition",
        " stt",
        " selenium",
        " speech-to-text",
        " selenium",
        " voice recognition",
        " voice interaction",
        " multilingual",
        " multilingual support",
        " chromedriver"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "780294186fa083f70a51e32350ce3a3f3d272e6d85b725866a80461eded33b25",
                "md5": "43530af06fb3abcec51cbdeea70778c9",
                "sha256": "7f39b01d3c435fdcdb13711405ee3fb5371749d56d5b2ca55a92c6da8d41c126"
            },
            "downloads": -1,
            "filename": "WebSpeechRecognition-0.1.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "43530af06fb3abcec51cbdeea70778c9",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 5792,
            "upload_time": "2024-12-13T12:04:00",
            "upload_time_iso_8601": "2024-12-13T12:04:00.643494Z",
            "url": "https://files.pythonhosted.org/packages/78/02/94186fa083f70a51e32350ce3a3f3d272e6d85b725866a80461eded33b25/WebSpeechRecognition-0.1.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d4c3295d46683cd169df97eb461541b3aa897cc3210b4f2c5d4fe00bb4fc3511",
                "md5": "66321696812856ebb9d3607dbf5cc540",
                "sha256": "3d94b2cb0b086482ac5f088ef0cbb2bde0e21a6ee8b1800699d31c7ad311bef5"
            },
            "downloads": -1,
            "filename": "WebSpeechRecognition-0.1.4.tar.gz",
            "has_sig": false,
            "md5_digest": "66321696812856ebb9d3607dbf5cc540",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 4152,
            "upload_time": "2024-12-13T12:04:02",
            "upload_time_iso_8601": "2024-12-13T12:04:02.078707Z",
            "url": "https://files.pythonhosted.org/packages/d4/c3/295d46683cd169df97eb461541b3aa897cc3210b4f2c5d4fe00bb4fc3511/WebSpeechRecognition-0.1.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-12-13 12:04:02",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "webspeechrecognition"
}
        
Elapsed time: 0.41786s