{"id":22391,"library":"speechmatics-rt","title":"Speechmatics Real-Time API Client","description":"Official Python client for Speechmatics real-time speech-to-text API. Version 1.0.0, supports Python >=3.9. Actively maintained.","status":"active","version":"1.0.0","language":"python","source_language":"en","source_url":"https://github.com/speechmatics/speechmatics-rt-sdk-python","tags":["speech-to-text","real-time","speechmatics","api-client"],"install":[{"cmd":"pip install speechmatics-rt","lang":"bash","label":"Install from PyPI"}],"dependencies":[],"imports":[{"note":"Note underscore in module name.","symbol":"WebsocketsClient","correct":"from speechmatics_rt import WebsocketsClient"}],"quickstart":{"code":"from speechmatics_rt import WebsocketsClient\nimport os\n\n# Obtain an API key from Speechmatics\napi_key = os.environ.get('SM_API_KEY', '')\n\nclient = WebsocketsClient(api_key)\n\n# Define transcription configuration\nconf = {\n    \"type\": \"transcription\",\n    \"transcription_config\": {\n        \"language\": \"en\",\n        \"operating_point\": \"enhanced\"\n    }\n}\n\n# Open a connection and send audio file\ndef on_transcription(message):\n    print(message)\n\nclient.add_listener('transcription', on_transcription)\n\nwith open('audio.wav', 'rb') as audio:\n    client.run(audiostream, conf)","lang":"python","description":"Example of connecting and transcribing a local audio file."},"warnings":[{"fix":"Use `from speechmatics_rt import WebsocketsClient`.","message":"The library uses underscore in its Python module name: `speechmatics_rt`, not `speechmatics-rt`.","severity":"gotcha","affected_versions":"all"},{"fix":"Call `client.run_async(audiostream, conf)` instead of `client.run(audiostream, conf)` for async operation.","message":"The `run` method is blocking; for non-blocking use `run_async`.","severity":"gotcha","affected_versions":"all"},{"fix":"Upgrade to Python 3.9 or later.","message":"Version 1.0.0 removed support for Python <3.9.","severity":"breaking","affected_versions":">=1.0.0"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Install the correct package: `pip install speechmatics-rt` then import as `from speechmatics_rt import WebsocketsClient`.","cause":"Wrong import path; the package installs as `speechmatics_rt` not `speechmatics`.","error":"ModuleNotFoundError: No module named 'speechmatics'"},{"fix":"Import correctly: `from speechmatics_rt import WebsocketsClient`.","cause":"Forgetting to import the class from the module.","error":"AttributeError: module 'speechmatics_rt' has no attribute 'WebsocketsClient'"},{"fix":"Set SM_API_KEY environment variable or pass a valid API key to WebsocketsClient.","cause":"Invalid or missing API key.","error":"RuntimeError: Connection closed with status 401"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}