Inspiration

The inspiration for this project is in regards to the evolving gaming industry applying more ways players can interact with a game. Instead of just moving or clicking buttons, new games have begun to add voice-operated mechanics in order to immerse the player. As beginners, we wanted to challenge ourselves by creating a game that utilizes voice-operated systems in order to play the game.

What it does

This project is a game that asks the player several questions that are then answered by the player through a mic source. The program then takes in the audio that the user said and interprets it in order to play the game. In order to interpret what the player is saying, we created keywords or sounds that the program can use to recognize the player’s answers.

How we built it

In order to build this project, we used Pycharm and Visual Studio Code to write our program. We used google speech API in order to recognize the user’s voice and utilize it in our program. We used a Python package called playsound to play pre-recorded audio files that would act as the speaker of the game.

Challenges we ran into

We experienced several bugs throughout our process, one of these bugs we experienced was our narrator repeatedly reiterating the score. Another issue we faced was implementing a GUI to our Python program, we kept facing issues adding the GUI to simultaneously run alongside the audio portion of the program. An issue we also had was the game restarting without resetting the scores when the player wants to replay the game. The main issue we had was the playsound package that was not recognizing file names in a list that we had created and would instead just make the narrator read the file name as a string itself.

Accomplishments that we're proud of

Throughout this hackathon event, we had run into several problems that we are proud to have overcome. For one, we are proud to have brought our idea to full fruition, creating a fully voice-operated game, while also being as efficient as possible in distributing the workload, we had two members working on the program, while we had two others working on creating audio files so we can make the game feel more immersive. We are also proud of our game logic, we had taken into consideration the psychological aspect of baseball in which the batter and the pitcher both anticipate their moves. We are also proud of maneuvering through the google speech API without facing many issues, we had anticipated this to be the hardest part of the project.

What we learned

Even though we faced many obstacles, we learned how to efficiently troubleshoot those issues by backtracking from the lines in which we received the errors. We also learned how to use Google Speech API and how that can be utilized to create a game that is solely operated on the user’s voice.

What's next for Audio Baseball

Would time have permitted, we wanted to include some visuals, giving the player a GUI that they could interact with. We also wanted to incorporate animations from the perspective of the pitcher, letting the player see an animation of the throw they chose.

Built With

Share this project:

Updates