code: def preview_wave(message, wpm=WPM, frequency=FREQUENCY, framerate=FRAMERATE, amplitude=AMPLITUDE, word_ref=WORD):
      
      samp_nb = samples_nb(message=message, wpm=wpm, framerate=framerate, word_spaced=False)
      import sounddevice as sd
      lst_bin = _encode_binary(message)
      amplitude = _limit_value(amplitude)
      seconds_per_dot = _seconds_per_dot(word_ref)  # 1.2
      a = [calculate_wave(i, lst_bin, wpm, frequency, framerate, amplitude, seconds_per_dot)
           for i in range(samp_nb)]
      sd.play(a, framerate, blocking=True)
docs: Listen (preview) wave
  
      sounddevice is required http://python-sounddevice.readthedocs.org/
      $ pip install sounddevice