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

Modem play audio (wav file) fails #49

Closed
emxsys opened this issue Aug 4, 2020 · 0 comments
Closed

Modem play audio (wav file) fails #49

emxsys opened this issue Aug 4, 2020 · 0 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@emxsys
Copy link
Owner

emxsys commented Aug 4, 2020

After the port to Python3, the Modem class fails to play the audio file. The system stalls.
Following is the output of the Modem unit tests after pressing Ctrl-C

(python3) pi@hamshack:~/src/callattendant/src $ python hardware/modem.py
[Configuration]
  BLOCKED_ACTIONS = ('play_message',)
  BLOCKED_MESSAGE_FILE = hardware/blocked.wav
  BLOCK_ENABLED = True
  BLOCK_NAME_PATTERNS = {'V[0-9]{15}': 'Telemarketer Caller ID'}
  BLOCK_NUMBER_PATTERNS = {}
  DATABASE = callattendant.db
  DEBUG = False
  DEBUGs = True
  ENV = production
  ROOT_PATH = /home/pi/src/callattendant/src
  SCREENING_MODE = ('whitelist', 'blacklist')
  TESTING = False
Running Unit Tests....
Modem COM Port is: /dev/ttyACM0
Assert factory reset
Assert display modem settings
Assert put modem into voice mode.
Assert set compression method and sampling rate specifications.
Assert put modem into TAD mode.
Assert put modem into data transmit state.
Assert cancel data transmit state.
Play Audio Msg - Start
Play Audio Msg - playing wav file
^CTraceback (most recent call last):
  File "hardware/modem.py", line 563, in <module>
    sys.exit(test(config, phone_ringing, handle_caller))
  File "hardware/modem.py", line 534, in test
    modem.play_audio(os.path.join(currentdir, "sample.wav"))
  File "hardware/modem.py", line 234, in play_audio
    time.sleep(.12)
KeyboardInterrupt

@emxsys emxsys added the bug Something isn't working label Aug 4, 2020
@emxsys emxsys added this to the Release 0.3 milestone Aug 4, 2020
@emxsys emxsys self-assigned this Aug 4, 2020
@emxsys emxsys closed this as completed in 85a0ac3 Aug 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant