Skip to main content

A Django app to make voice-bots.

Project description

Package for django support bot with speech recognition and voice commands.

Detailed documentation is in the “docs” directory.

Installation

To install it, simply:

pip install django-voice-bot

Quick start

  1. Add “voice-bot” to your INSTALLED_APPS setting like this:

    INSTALLED_APPS = [
        ...
        'voice-bot',
    ]
  2. Include the bot URLconf in your project urls.py like this

    path('/', include('voice-bot.urls')),
  3. Run python manage.py migrate to create the voice-bot models.

  4. To connect the bot to the view, you must specify the decorator `@add_bot(bot_name='BOT_NAME')` before the view.<br>

  5. Then insert to view template following code:

    {% include "voice-bot/bot_include.html" %}
  6. Modify your function as follows:

    @add_bot(bot_name='BOT_NAME')
    def attached_function(request, **kwargs):
        ...
        return render(request, 'your_template_name.html', {"commands": kwargs['commands'],
                                                           "bot_name": kwargs['bot_name']}
  7. Start the development server and visit `http://127.0.0.1:8000/admin/` to create a voice-bot (you’ll need the Admin app enabled).

8. Setup your bot In the admin panel, you need to set the bot’s language, name, and messages about successful and unsuccessful command execution.<br> The```speech_full``` flag will play all trigger phrases for all bot commands when activated.<br> Then you need to set commands for the bot.<br> Parameters:<br> `description` — description of the bot;<br> `redirect_url` — URL that will be redirected to when executing the command, can be global.<br> `trigger_words` - the words that trigger the command must be separated by commas.<br> `message` — the message that will be voiced when the command is executed.<br> `api_url` - link to the url from which data will be uploaded.<br> `api_flag` — when activated, the default message will be replaced with the one received from the API.<br> `api_header` - the header from which the new message will be written.<br> `request_headers` - request headers.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-voice-bot-0.3.tar.gz (9.6 kB view details)

Uploaded Source

File details

Details for the file django-voice-bot-0.3.tar.gz.

File metadata

  • Download URL: django-voice-bot-0.3.tar.gz
  • Upload date:
  • Size: 9.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/45.2.0.post20200210 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

File hashes

Hashes for django-voice-bot-0.3.tar.gz
Algorithm Hash digest
SHA256 a6b1b6833142efac8106cbb2856493fda118ce23678f255630cef0edce2a218b
MD5 257232ab692451dada329eac87ec0bff
BLAKE2b-256 81dc696d2a79b8ffff0ae9c4a133cdd3e3e6e9e83dfee4766b24391079097b7f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page