New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

stt-watson

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

stt-watson

Continuous speech to text using watson in python with websocket and record from microphone

  • 1.0.3
  • PyPI
  • Socket score

Maintainers
1

stt-watson

Continuous speech to text using watson in python with websocket and record from microphone

Requirements

  • Python 2.7
  • Pip
  • portaudio, can be installed with brew install portaudio (mac) or apt-get install portaudio19-dev(linux)

Installation

Install with pip: pip install stt-watson

Run the playground

Simply run in command line: stt-watson

At the first launch it will create a config file located to ~/.config-stt-watson.yml and ask you your watson credentials

Usage for developers

Bootstrap example:

from stt_watson.SttWatson import SttWatson
from stt_watson.SttWatsonAbstractListener import SttWatsonAbstractListener

"""
Example of listener to use data given by stt-watson (stt-watson notify hypothesis to his listeners when he receive it)

Hypothesis format:
{
    'confidence': '0.1' // confidence of the sentence or words if exist
    'transcript': 'the transcription of your voice'
}
"""
class MyListener(SttWatsonAbstractListener):
    def __init__(self):
        pass
    """
    This give hypothesis from watson when your sentence is finished
    """
    def listenHypothesis(self, hypothesis):
        print "Hypothesis: {0}".format(hypothesis)

    """
    This give the json received from watson
    """
    def listenPayload(self, payload):
        print(u"Text message received: {0}".format(payload))
    """
    This give hypothesis from watson when your sentence is not finished
    """
    def listenInterimHypothesis(self, interimHypothesis):
        print "Interim hypothesis: {0}".format(interimHypothesis)


myListener = MyListener()
sttWatson = SttWatson('watson_user', 'watson_password')
sttWatson.addListener(myListener)
sttWatson.run()

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc