rabin 6 yıl önce
ebeveyn
işleme
9afced8226
3 değiştirilmiş dosya ile 5 ekleme ve 6 silme
  1. 1 1
      service/api/baidu.py
  2. 3 4
      service/player/sox.py
  3. 1 1
      vecan.py

+ 1 - 1
service/api/baidu.py

@@ -20,7 +20,7 @@ dev_pid:
 """
 from __future__ import division
 from ..__load__ import *
-from .base import Base
+from base import Base
 # 需要百度SDK
 from aip import AipSpeech
 

+ 3 - 4
service/player/sox.py

@@ -17,10 +17,9 @@ class Sox(Base):
 		cmd = ['play', '-v', str(self.volume), str(self.src)]
 		self.logger.debug('Executing %s', ' '.join(cmd))
 
-		#self.proc = subprocess.Popen(cmd, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
-		print(cmd)
-		return
-		self.proc = subprocess.Popen(cmd)
+		self.proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
+		#print(cmd)
+		#return
 		self.playing = True
 		self.proc.wait()
 		self.playing = False

+ 1 - 1
vecan.py

@@ -20,7 +20,7 @@ class Vecan(object):
 
 		self.robot = Demeter.service('robot')
 		self.robot.init()
-		self.robot.say('你好,我是神算终端机器人vecan,很高兴为你服务')
+		#self.robot.say('你好,我是神算终端机器人vecan,很高兴为你服务')
 
 		Demeter.dog = WatchDog.init()