How to use the stt.simple_stt.SimpleSTT function in stt

To help you get started, we’ve selected a few stt examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ChristopherRogers1991 / mycroft-face-wake / main.py View on Github external
from __future__ import print_function
from object_watcher.object_watcher import ObjectWatcher
from object_watcher.object_watcher import create_dlib_frontal_face_detector
from simple_audio_recorder.simple_audio_recorder import SimpleAudioRecorder
from stt.simple_stt import SimpleSTT
from websocket import create_connection
import json
import time
import traceback

transcriber = SimpleSTT()

URL_TEMPLATE = "{scheme}://{host}:{port}{path}"


def send_message(message, host="localhost", port=8181, path="/core", scheme="ws"):
    payload = json.dumps({
        "type": "recognizer_loop:utterance",
        "context": "",
        "data": {
            "utterances": [message]
        }
    })
    url = URL_TEMPLATE.format(scheme=scheme, host=host, port=str(port), path=path)
    ws = create_connection(url)
    ws.send(payload)
    ws.close()

stt

A library for doing speech recognition using a Coqui STT model

MPL-2.0
Latest version published 2 years ago

Package Health Score

63 / 100
Full package analysis