• R/O
  • HTTP
  • SSH
  • HTTPS

nvdajpmiscdep: Commit

miscdep for NVDA Japanese


Commit MetaInfo

Revision2bc1305e1c9f1227b8edac1ac68ab879341c92eb (tree)
Time2014-10-06 13:55:03
AuthorTakuya Nishimoto <nishimotz@gmai...>
CommiterTakuya Nishimoto

Log Message

skip pyaudio if not available

Change Summary

Incremental Difference

--- a/jptools/jtalkRunner.py
+++ b/jptools/jtalkRunner.py
@@ -13,7 +13,10 @@ import os
1313 import sys
1414 import wave
1515 import time
16-import pyaudio
16+try:
17+ import pyaudio
18+except:
19+ pyaudio = None
1720 import cProfile
1821 import pstats
1922 JT_DIR = os.path.normpath(
@@ -61,6 +64,8 @@ voices = [
6164 ]
6265
6366 def pa_play(data, samp_rate = 16000):
67+ if pyaudio is None:
68+ return
6469 p = pyaudio.PyAudio()
6570 stream = p.open(format = p.get_format_from_width(2),
6671 channels = 1, rate = samp_rate, output = True)
Show on old repository browser