Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix and Expand Test Cases in test_special_features.py #778

Open
amjadnattouf opened this issue Nov 1, 2024 · 0 comments
Open

Fix and Expand Test Cases in test_special_features.py #778

amjadnattouf opened this issue Nov 1, 2024 · 0 comments
Assignees

Comments

@amjadnattouf
Copy link

Steps to reproduce

To reproduce this issue, run the test_special_features.py script in the speech_recognition module. Specifically, focus on the following test cases:

  • test_sphinx_keywords: Ensure this test runs with a valid english.wav audio file.
  • test_incompatible_audio_file_error: Run this test with an english.mp3 file or any audio file in an unsupported format.

If available, include an audio file that matches the described scenarios for more accurate testing.

Expected behavior

I expected the TestSpecialFeatures test cases to:

  • Correctly raise a ValueError when an incompatible audio format (e.g., MP3) is provided.
  • Pass or fail the keyword recognition tests accurately with specific assertions in test_sphinx_keywords.

Actual behavior

The test cases did not behave as expected in the following ways:

  • The test_incompatible_audio_file_error test did not properly detect the audio file format and failed to raise the ValueError.
  • The test_sphinx_keywords test produced unexpected results when checking specific keyword recognition.

System information

My system is MacOS.
My Python version is 3.12.3.
My Pip version is 24.2.
My SpeechRecognition library version is 3.8.1.
My PyAudio library version is not installed.
My microphones are: ['Microphone 1', 'Microphone 2'].
My working microphones are: ['Microphone 1'].

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant