{"library":"speechmatics-rt","title":"Speechmatics Real-Time API Client","type":"library","description":"Official Python client for Speechmatics real-time speech-to-text API. Version 1.0.0, supports Python >=3.9. Actively maintained.","language":"python","status":"active","last_verified":"Mon Apr 27","install":{"commands":["pip install speechmatics-rt"],"cli":null},"imports":["from speechmatics_rt import WebsocketsClient"],"auth":{"required":false,"env_vars":[]},"links":{"homepage":"https://www.speechmatics.com","github":"https://github.com/speechmatics/speechmatics-python-sdk","docs":"https://docs.speechmatics.com/","changelog":null,"pypi":"https://pypi.org/project/speechmatics-rt/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null},"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.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}