THIS IS A BETA VERSION, SOMETIMES THE MEDIA SOURCE MAY NOT PLAY DUE TO VOICE RECOGNITION INCONSTENCE
A Python script for OBS (Open Broadcaster Software) that plays a video media source according the configuration file through voice recognition.
-
Create a file with the extension
.json
and follow the structure of the sample file -
Install the
speech_recognition
requirement in which the script needs by opening the terminal, going to the folder where the script is located and running the commandpip install speech_recognition
-
Open Scripts window from Tools (T) > Script and click at Python Configuration tab and set the location of Python installed on your machine
![image](https://private-user-images.githubusercontent.com/8949271/246950139-0d398233-1b7f-4a04-b047-abccf7b9fbb4.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjYxMDEzNDQsIm5iZiI6MTcyNjEwMTA0NCwicGF0aCI6Ii84OTQ5MjcxLzI0Njk1MDEzOS0wZDM5ODIzMy0xYjdmLTRhMDQtYjA0Ny1hYmNjZjdiOWZiYjQucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDkxMiUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA5MTJUMDAzMDQ0WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9ZTE1MGUzNmJkY2E2MzVmNzVmMjBhNTNmN2U3ODM4ZGU5ZDJmZjgwNzFjYzQ1NjA3N2ZlMGRmNWU2YWNmNGZlMSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.DE7VmBoQh3mTDPkz4CSAuj2wQJpj8_4TYTHdtSUj9YY)
- Go back to Scripts tab and include the python script by clicking at the + sign
![image](https://private-user-images.githubusercontent.com/8949271/246949372-668d9ebf-7c4e-46ea-9301-3d945ed290cb.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjYxMDEzNDQsIm5iZiI6MTcyNjEwMTA0NCwicGF0aCI6Ii84OTQ5MjcxLzI0Njk0OTM3Mi02NjhkOWViZi03YzRlLTQ2ZWEtOTMwMS0zZDk0NWVkMjkwY2IucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDkxMiUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA5MTJUMDAzMDQ0WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9MGQzN2Q1OTMxZTFkNTljZGFkN2YzZjc5NTRjNjExODZkNjYwZjJkYTA0MjM0NGQ4OGQxNmQxZjgyZGU2NmVhNyZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.p8SxTmqu6BckfXh-KdojmXNqzSwM3pEcLw2-4_D1oVg)
- Set the script configurations as you wish. Check out each configuration description:
Configuration | Description |
---|---|
Voice Recognition Language | Set the language of the voice to be recognized |
Configuration File | Configuration file in JSON format (Only files named AutoMemeConfig.json is accepted) |
Time in seconds to wait for phrase | Time to listen the phrase before checking if a video/meme should be played or not. If the time is longer then processing time (delay) to find a video/meme and play it will also be longer |
OBS Web Socket Hostname | Hostname of the web socket of you OBS client |
OBS Web Socket Port | Port of the web socket of you OBS client |
Debug | Allow logging on the events of the script (Ignore this if you don't know about it) |