say_weather,语音播报天气的脚本(非espeak/festival发音)
-
- 帖子: 1331
- 注册时间: 2006-07-09 12:22
- 来自: 南京
Re: say_weather,语音播报天气的脚本(非espeak/festival发音)
满屏的大图标表情,胜似水区啊。
- satan1001
- 帖子: 186
- 注册时间: 2008-04-18 8:10
Re: say_weather,语音播报天气的脚本(非espeak/festival发音)
很有才
我看到脚本的厉害了 研究中


我看到脚本的厉害了 研究中
- Jarson
- 帖子: 2371
- 注册时间: 2008-07-21 9:44
- 来自: 深圳
- 联系:
-
- 帖子: 74
- 注册时间: 2007-09-09 14:34
Re: say_weather,语音播报天气的脚本(非espeak/festival发音)

- wiewi
- 帖子: 628
- 注册时间: 2008-11-20 22:50
- 系统: ArchLinux
Re: say_weather,语音播报天气的脚本(非espeak/festival发音)
赞 好用啊
===我的小窝===
无聊吗?点我吧,楼主迫切期待你的光临~~
又一个轮子
------------------------------------
这年头,没有1000贴都不好意思见人了
------------------------------------
献丑不如藏拙
------------
无聊吗?点我吧,楼主迫切期待你的光临~~
又一个轮子
------------------------------------
这年头,没有1000贴都不好意思见人了
------------------------------------
献丑不如藏拙
------------
- shichix
- 帖子: 1082
- 注册时间: 2008-11-02 12:25
Re: say_weather,语音播报天气的脚本(非espeak/festival发音)
建议写一个语音报时的脚本放入任务栏(省去了双击后选择显示还是运行),点击后报时间。
细节:1。点击一次报时一次,报完后脚本自动退出。2。所报时间为系统时间。3。所报时间可以用“上午“,“下午“以减少语音数据库的文件量。
该程序提供给盲人或视力及差人士使用应该不错的。
能写出语音天气预报,语音报时楼主肯定能写出来是吧?
细节:1。点击一次报时一次,报完后脚本自动退出。2。所报时间为系统时间。3。所报时间可以用“上午“,“下午“以减少语音数据库的文件量。
该程序提供给盲人或视力及差人士使用应该不错的。
能写出语音天气预报,语音报时楼主肯定能写出来是吧?

我有个习惯,从不用花钱的软件。^_^
- xiooli
- 帖子: 6956
- 注册时间: 2007-11-19 21:51
- 来自: 成都
- 联系:
Re: say_weather,语音播报天气的脚本(非espeak/festival发音)
写过语音报时的脚本,请自行搜索。shichix 写了:建议写一个语音报时的脚本放入任务栏(省去了双击后选择显示还是运行),点击后报时间。
细节:1。点击一次报时一次,报完后脚本自动退出。2。所报时间为系统时间。3。所报时间可以用“上午“,“下午“以减少语音数据库的文件量。
该程序提供给盲人或视力及差人士使用应该不错的。
能写出语音天气预报,语音报时楼主肯定能写出来是吧?
- shichix
- 帖子: 1082
- 注册时间: 2008-11-02 12:25
- shichix
- 帖子: 1082
- 注册时间: 2008-11-02 12:25
Re: say_weather,语音播报天气的脚本(非espeak/festival发音)
我有个习惯,从不用花钱的软件。^_^
- pityonline
- 帖子: 3864
- 注册时间: 2008-12-09 12:44
- 来自: 北京
- 联系:
Re: say_weather,语音播报天气的脚本(非espeak/festival发音)
i tried to run it on my smart q5, it showed this:
but no sound i could hear.
then i opened the script with leafpad:
i found this in the end:
i remembered the command to play the .wav file which i recorded on q5, it's:
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!
代码: 全选
user@mojo:~/disk/say_weather$ ./say_weather
北京 22℃~33℃ 下午 晴转多云; 晚上 晴
user@mojo:~/disk/say_weather$
then i opened the script with leafpad:
代码: 全选
sudo leafpad ~/disk/say_weather/say_weather
代码: 全选
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
代码: 全选
1、打开终端输入 :cat /dev/audio > file.wav 开始录音
2、停止 : ctrl+c
3、播放 : cat file.wav > /dev/audio
well, can anybody help me to work it out on my q5? thanks!
- shichix
- 帖子: 1082
- 注册时间: 2008-11-02 12:25
Re: say_weather,语音播报天气的脚本(非espeak/festival发音)
截图 

- 附件
-
- Screenshot1.png (8.89 KiB) 查看 2816 次
我有个习惯,从不用花钱的软件。^_^
- xiooli
- 帖子: 6956
- 注册时间: 2007-11-19 21:51
- 来自: 成都
- 联系:
Re: say_weather,语音播报天气的脚本(非espeak/festival发音)
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:pityonline 写了:i tried to run it on my smart q5, it showed this:but no sound i could hear.代码: 全选
user@mojo:~/disk/say_weather$ ./say_weather 北京 22℃~33℃ 下午 晴转多云; 晚上 晴 user@mojo:~/disk/say_weather$
then i opened the script with leafpad:i found this in the end:代码: 全选
sudo leafpad ~/disk/say_weather/say_weather
i remembered the command to play the .wav file which i recorded on q5, it's:代码: 全选
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
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.代码: 全选
1、打开终端输入 :cat /dev/audio > file.wav 开始录音 2、停止 : ctrl+c 3、播放 : cat file.wav > /dev/audio
well, can anybody help me to work it out on my q5? thanks!
代码: 全选
aplay "${wavs_dir}/$j" &> /dev/null
change into:
cat "${wavs_dir}/$j" > /dev/audio
good luck!
- shichix
- 帖子: 1082
- 注册时间: 2008-11-02 12:25
- pityonline
- 帖子: 3864
- 注册时间: 2008-12-09 12:44
- 来自: 北京
- 联系:
Re: say_weather,语音播报天气的脚本(非espeak/festival发音)
i didn't install aplay on my q5, i tried install it on q5, but it showed this:
it seemed that no aplay for arm yet. well, i'm gonna try that on my pc tomorrow. thank you for your advise anyway!
代码: 全选
user@mojo:~$ sudo apt-get install aplay
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
Reading state information... 完成
E: 无法找到软件包 aplay
user@mojo:~$
- pityonline
- 帖子: 3864
- 注册时间: 2008-12-09 12:44
- 来自: 北京
- 联系:
Re: say_weather,语音播报天气的脚本(非espeak/festival发音)
oh my god! i got that working on my q5 now!
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.
代码: 全选
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$