say_weather,语音播报天气的脚本(非espeak/festival发音)

sh/bash/dash/ksh/zsh等Shell脚本
aBiNg
帖子: 1331
注册时间: 2006-07-09 12:22
来自: 南京

Re: say_weather,语音播报天气的脚本(非espeak/festival发音)

#16

帖子 aBiNg » 2008-10-11 16:14

满屏的大图标表情,胜似水区啊。
头像
satan1001
帖子: 186
注册时间: 2008-04-18 8:10

Re: say_weather,语音播报天气的脚本(非espeak/festival发音)

#17

帖子 satan1001 » 2009-05-21 17:48

很有才 :em03 :em03
我看到脚本的厉害了 研究中
头像
Jarson
帖子: 2371
注册时间: 2008-07-21 9:44
来自: 深圳
联系:

Re: say_weather,语音播报天气的脚本(非espeak/festival发音)

#18

帖子 Jarson » 2009-05-21 17:51

mark,顶下~~
archangelwin
帖子: 74
注册时间: 2007-09-09 14:34

Re: say_weather,语音播报天气的脚本(非espeak/festival发音)

#19

帖子 archangelwin » 2009-06-19 19:06

:em11 太B T了。。支持一下。
头像
wiewi
帖子: 628
注册时间: 2008-11-20 22:50
系统: ArchLinux

Re: say_weather,语音播报天气的脚本(非espeak/festival发音)

#20

帖子 wiewi » 2009-06-20 22:03

赞 好用啊
===我的小窝===
无聊吗?点我吧,楼主迫切期待你的光临~~
又一个轮子
------------------------------------
这年头,没有1000贴都不好意思见人了
------------------------------------
献丑不如藏拙
------------
头像
shichix
帖子: 1082
注册时间: 2008-11-02 12:25

Re: say_weather,语音播报天气的脚本(非espeak/festival发音)

#21

帖子 shichix » 2009-06-21 17:06

建议写一个语音报时的脚本放入任务栏(省去了双击后选择显示还是运行),点击后报时间。
细节:1。点击一次报时一次,报完后脚本自动退出。2。所报时间为系统时间。3。所报时间可以用“上午“,“下午“以减少语音数据库的文件量。
该程序提供给盲人或视力及差人士使用应该不错的。
能写出语音天气预报,语音报时楼主肯定能写出来是吧? :em06
我有个习惯,从不用花钱的软件。^_^
头像
xiooli
帖子: 6956
注册时间: 2007-11-19 21:51
来自: 成都
联系:

Re: say_weather,语音播报天气的脚本(非espeak/festival发音)

#22

帖子 xiooli » 2009-06-21 17:15

shichix 写了:建议写一个语音报时的脚本放入任务栏(省去了双击后选择显示还是运行),点击后报时间。
细节:1。点击一次报时一次,报完后脚本自动退出。2。所报时间为系统时间。3。所报时间可以用“上午“,“下午“以减少语音数据库的文件量。
该程序提供给盲人或视力及差人士使用应该不错的。
能写出语音天气预报,语音报时楼主肯定能写出来是吧? :em06
写过语音报时的脚本,请自行搜索。
头像
shichix
帖子: 1082
注册时间: 2008-11-02 12:25

Re: say_weather,语音播报天气的脚本(非espeak/festival发音)

#23

帖子 shichix » 2009-06-21 17:39

哦,我搜~搜到用用看,谢谢!
我有个习惯,从不用花钱的软件。^_^
头像
shichix
帖子: 1082
注册时间: 2008-11-02 12:25

Re: say_weather,语音播报天气的脚本(非espeak/festival发音)

#24

帖子 shichix » 2009-06-21 17:56

已经搜到了,把快捷方式加入任务栏了。点击就报时,蛮不错的,连年月日,几秒都一起报了。其实光报时间就行了。 :em11
下载地址:viewtopic.php?f=21&t=152703
我有个习惯,从不用花钱的软件。^_^
头像
pityonline
帖子: 3864
注册时间: 2008-12-09 12:44
来自: 北京
联系:

Re: say_weather,语音播报天气的脚本(非espeak/festival发音)

#25

帖子 pityonline » 2009-06-21 17:57

i tried to run it on my smart q5, it showed this:

代码: 全选

user@mojo:~/disk/say_weather$ ./say_weather
北京 22℃~33℃ 下午 晴转多云; 晚上 晴
user@mojo:~/disk/say_weather$ 
but no sound i could hear.
then i opened the script with leafpad:

代码: 全选

sudo leafpad ~/disk/say_weather/say_weather
i found this in the end:

代码: 全选

weather="${weather#* }"
echo ${weather0}
aplay "${wavs_dir}/天气预报" "${wavs_dir}/;" "${wavs_dir}/气温" &> /dev/null
for j in ${weather};do
    aplay "${wavs_dir}/$j" &> /dev/null
done
i remembered the command to play the .wav file which i recorded on q5, it's:

代码: 全选

1、打开终端输入 :cat /dev/audio > file.wav    开始录音
2、停止 : ctrl+c
3、播放 : cat file.wav > /dev/audio
it workes very well. then i put 'audio' instead of 'null', save the script and runned it again, it sounded like several 'pa, pa'. so i put 'espeak' instead of 'aplay',(i've already installed espeak.) save and runned it again, but it still played no sounds.

well, can anybody help me to work it out on my q5? thanks!
Pity is the bomp!
活着就是折腾!生命不息,折腾不止!
看这帮家伙在干什么?@pityonline/u
Dropbox+Vps+PC 跑起来了!这是邀请链接
头像
shichix
帖子: 1082
注册时间: 2008-11-02 12:25

Re: say_weather,语音播报天气的脚本(非espeak/festival发音)

#26

帖子 shichix » 2009-06-21 18:02

截图 :em02
附件
Screenshot1.png
Screenshot1.png (8.89 KiB) 查看 2819 次
我有个习惯,从不用花钱的软件。^_^
头像
xiooli
帖子: 6956
注册时间: 2007-11-19 21:51
来自: 成都
联系:

Re: say_weather,语音播报天气的脚本(非espeak/festival发音)

#27

帖子 xiooli » 2009-06-21 18:12

pityonline 写了:i tried to run it on my smart q5, it showed this:

代码: 全选

user@mojo:~/disk/say_weather$ ./say_weather
北京 22℃~33℃ 下午 晴转多云; 晚上 晴
user@mojo:~/disk/say_weather$ 
but no sound i could hear.
then i opened the script with leafpad:

代码: 全选

sudo leafpad ~/disk/say_weather/say_weather
i found this in the end:

代码: 全选

weather="${weather#* }"
echo ${weather0}
aplay "${wavs_dir}/天气预报" "${wavs_dir}/;" "${wavs_dir}/气温" &> /dev/null
for j in ${weather};do
    aplay "${wavs_dir}/$j" &> /dev/null
done
i remembered the command to play the .wav file which i recorded on q5, it's:

代码: 全选

1、打开终端输入 :cat /dev/audio > file.wav    开始录音
2、停止 : ctrl+c
3、播放 : cat file.wav > /dev/audio
it workes very well. then i put 'audio' instead of 'null', save the script and runned it again, it sounded like several 'pa, pa'. so i put 'espeak' instead of 'aplay',(i've already installed espeak.) save and runned it again, but it still played no sounds.

well, can anybody help me to work it out on my q5? thanks!
are you sure that you got aplay installed ? if no, try install it. as you have mentioned that running command cat file.wav > /dev/audio works, i suggest you edit the line begins with aplay like this:

代码: 全选

aplay "${wavs_dir}/$j" &> /dev/null
change into:
cat "${wavs_dir}/$j" > /dev/audio
then try again, i'm quite sure it's going to go.
good luck!
头像
shichix
帖子: 1082
注册时间: 2008-11-02 12:25

Re: say_weather,语音播报天气的脚本(非espeak/festival发音)

#28

帖子 shichix » 2009-06-21 18:18

改成只报时间,不报年月日了。 :em06
我有个习惯,从不用花钱的软件。^_^
头像
pityonline
帖子: 3864
注册时间: 2008-12-09 12:44
来自: 北京
联系:

Re: say_weather,语音播报天气的脚本(非espeak/festival发音)

#29

帖子 pityonline » 2009-06-21 19:14

i didn't install aplay on my q5, i tried install it on q5, but it showed this:

代码: 全选

user@mojo:~$ sudo apt-get install aplay
正在读取软件包列表... 完成
正在分析软件包的依赖关系树       
Reading state information... 完成      
E: 无法找到软件包 aplay
user@mojo:~$ 
it seemed that no aplay for arm yet. well, i'm gonna try that on my pc tomorrow. thank you for your advise anyway!
Pity is the bomp!
活着就是折腾!生命不息,折腾不止!
看这帮家伙在干什么?@pityonline/u
Dropbox+Vps+PC 跑起来了!这是邀请链接
头像
pityonline
帖子: 3864
注册时间: 2008-12-09 12:44
来自: 北京
联系:

Re: say_weather,语音播报天气的脚本(非espeak/festival发音)

#30

帖子 pityonline » 2009-06-21 19:36

oh my god! i got that working on my q5 now!

代码: 全选

user@mojo:~$ sudo apt-cache search aplay
alsa-utils - ALSA utilities
kmplayer - media player for KDE
pulseaudio-utils - Command line tools for the PulseAudio sound server
camediaplay - Still Camera Digital Interface
libsds-dev - development file for libsds
libsomaplayer-dev - development file for libsomaplayer
libsomaplayer0 - primary lib for somaplayer
somaplayer - player audio for the soma suite
somaplayer-doc - documentation for somaplayer
splay - Sound player for MPEG-1,2 layer 1,2,3
gecko-mediaplayer - Media plug-in for Gecko browsers
gnome-mplayer - GNOME MPlayer is a simple GUI for MPlayer
user@mojo:~$ 

代码: 全选

user@mojo:~$ sudo apt-get install alsa-utils
正在读取软件包列表... 完成
正在分析软件包的依赖关系树       
Reading state information... 完成      
将会安装下列额外的软件包:
  linux-sound-base
推荐安装的软件包:
  alsa-base
下列【新】软件包将被安装:
  alsa-utils linux-sound-base
共升级了 0 个软件包,新安装了 2 个软件包,要卸载 0 个软件包,有 0 个软件未被升级。
需要下载 1092kB 的软件包。
After this operation, 1995kB of additional disk space will be used.
您希望继续执行吗?[Y/n]y
获取:1 http://repository.handhelds.org hasty/main linux-sound-base 1.0.16-0ubuntu4 [28.8kB]
获取:2 http://repository.handhelds.org hasty/main alsa-utils 1.0.15-3ubuntu2 [1063kB]
下载 1092kB,耗时 22s (48.6kB/s)                               
debconf: 无法初始化前端界面:Dialog
debconf: (对话框界面要求屏幕画面必须为至少 13 行高及 31 列宽.)
debconf: 返回前端界面:Readline
正在预设定软件包 ...
选中了曾被取消选择的软件包 linux-sound-base。
(正在读取数据库 ... 系统当前总共安装有 41448 个文件和目录。)
正在解压缩 linux-sound-base (从 .../linux-sound-base_1.0.16-0ubuntu4_all.deb) ...
选中了曾被取消选择的软件包 alsa-utils。
正在解压缩 alsa-utils (从 .../alsa-utils_1.0.15-3ubuntu2_arm.deb) ...
正在设置 linux-sound-base (1.0.16-0ubuntu4) ...
debconf: 无法初始化前端界面:Dialog
debconf: (对话框界面要求屏幕画面必须为至少 13 行高及 31 列宽.)
debconf: 返回前端界面:Readline

正在设置 alsa-utils (1.0.15-3ubuntu2) ...

E: Directory '/var/log/apt/' missing
user@mojo:~$

代码: 全选

user@mojo:~$ cd disk/say_weather
user@mojo:~/disk/say_weather$ ls
say_weather  say_weather.backup  wavs
user@mojo:~/disk/say_weather$ ./say_weather
北京 22℃~34℃ 今晚 晴转多云; 明天 晴
user@mojo:~/disk/say_weather$ 
i can hear the weather report now. but it didn't sound very well, and it might stop before it finished, i pressed ctrl+c to make it go on, finally it finished.
Pity is the bomp!
活着就是折腾!生命不息,折腾不止!
看这帮家伙在干什么?@pityonline/u
Dropbox+Vps+PC 跑起来了!这是邀请链接
回复