Skip to content

bay1877/NBA_ESPN_PlayByPlay_Announcer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Contributors Forks Stargazers Issues MIT License LinkedIn


Logo

NBA ESPN Live Play-By-Play Announcer

Announces gameplay for a live NBA game using ESPN's Play-by-Play Data
Explore the docs »

Report Bug · Request Feature

Table of Contents

  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Contact
  8. Acknowledgements

About The Project

When one does not have access to live sports, when the game is not streamed on live TV, what does one do? This project was born to give a way to keep up with the game without access or attention requirements.

As plays are received by the url request, new plays are detected and read aloud. New quarters are also detected.

Note: Up to the last 15 plays will be read when starting the script for an existing game. After that, plays are read as they come in through the request.

Built With

Getting Started

To get a local copy up and running follow these simple steps.

Prerequisites

This project assumes you have python installed.

Installation

  1. Clone the repo
    git clone https://github.com/bay1877/NBA_ESPN_PlayByPlay_Announcer.git
  2. Enter the repo directory
    cd NBA_ESPN_PlayByPlay_Announcer
  3. Setup and enter the virtual environment.
    python3 -m venv venv
    source ./venv/bin/activate
  4. Install Python packages
    pip install -r requirements.txt

MP3 Players

Different operating systems use different command line mp3/audio players. TTS.py currently supports MacOS; change os.system("afplay *") calls to match your OS.

Mac OS

Use afplay.

Linux

Try mpg123.

Windows

Use linux.

Usage

Play by Play
The above capture was taken from the following game: https://www.espn.com/nba/playbyplay/_/gameId/401332963.

For the game you want to listen to, select the gamecast for a live game, and then select Play-by-Play. This is the link that you will pass into the script as a runtime argument. It should be in the following format where n is the unique game Id given by ESPN.

https://www.espn.com/nba/playbyplay/_/gameId/n

Also note the current quarter of the game.

With the link and the current quarter, run the script with the below. Make sure to source the venv before running the script, and deactivate it when you are finished.

source venv/bin/activate
...
python run.py <espn play by play url> <quarter #>
...
deactivate

Roadmap

See the open issues for a list of proposed features (and known issues).

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the MIT License. See LICENSE for more information.

Contact

Bradley Yoder - [email protected]

Project Link: https://github.com/bay1877/NBA_ESPN_PlayByPlay_Announcer

Acknowledgements

About

Announces an NBA game according to ESPN's Play-By-Play.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages