导航:首页 > 编程知识 > 编程如何启动录音

编程如何启动录音

发布时间:2023-04-12 13:01:42

Ⅰ 智慧屋幼儿编程积木怎么录音

1、首先打开智慧屋幼儿编程积木设置。
2、然后点击录放按钮,选择确定。
3、最后将电子积木安装到做好的积木模型上就可以实现录音指令。

Ⅱ 用mfc做了一个录音程序,编程之后怎么使用这个程序来录音

可以使用对话框程序,用以按钮,点击按钮调用录音相关函数并保存录音到文件,在用旅没一点按钮作为语音识别开始按钮,点拆罩纳击按钮,调用相关函数对闷伍前面录音进行识别,然后显示结果。

Ⅲ android编程 如何调用系统录音机进行录音并存放在指定文件夹

如果学过就知道这是一个相对简单的问题,

  1. 首先进行布局,就是设置写按钮,文字之类的。

java">

2.写个activity,调用系统录音程序

er{

privateButtonbtnStart;
privateButtonbtnStop;
privateButtonbtnPlay;

;
privateFilerecAudioFile;
privateMusicPlayermPlayer;

@Override
publicvoidonCreate(BundlesavedInstanceState){
super.onCreate(savedInstanceState);
setContentView(R.layout.main);

setupViews();
}

privatevoidsetupViews(){
btnStart=(Button)findViewById(R.id.start);
btnStop=(Button)findViewById(R.id.stop);
btnPlay=(Button)findViewById(R.id.play);

btnStart.setOnClickListener(this);
btnStop.setOnClickListener(this);
btnPlay.setOnClickListener(this);

recAudioFile=newFile("/mnt/sdcard","new.amr");
}

@Override
publicvoidonClick(Viewv){
switch(v.getId()){
caseR.id.start:
startRecorder();
break;
caseR.id.stop:
stopRecorder();
break;
caseR.id.play:
mPlayer=newMusicPlayer(SoundRecorderActivity.this);
mPlayer.playMicFile(recAudioFile);
break;
default:
break;
}
}

privatevoidstartRecorder(){
mMediaRecorder=newMediaRecorder();
if(recAudioFile.exists()){
recAudioFile.delete();
}

mMediaRecorder.setAudioSource(MediaRecorder.AudioSource.MIC);
mMediaRecorder.setOutputFormat(MediaRecorder.OutputFormat.DEFAULT);
mMediaRecorder.setAudioEncoder(MediaRecorder.AudioEncoder.DEFAULT);
mMediaRecorder.setOutputFile(recAudioFile.getAbsolutePath());
try{
mMediaRecorder.prepare();
}catch(IllegalStateExceptione){
e.printStackTrace();
}catch(IOExceptione){
e.printStackTrace();
}

mMediaRecorder.start();
}

privatevoidstopRecorder(){
if(recAudioFile!=null){
mMediaRecorder.stop();
mMediaRecorder.release();
}
}
}</span>
如何保存到特定的目录,只需要得到recAudioFile=newFile("/mnt/sdcard","new.amr");就可以了。


3.设置播放类,也是调用播放方法。MediaPlayer


4添加权限
阅读全文

与编程如何启动录音相关的资料

热点内容
win10文件比率是什么 浏览:652
msdb数据库置疑 浏览:210
移动花卡免流app为什么要10元 浏览:147
xamppphp配置文件 浏览:268
删除ghost文件 浏览:642
苹果7可置换地方 浏览:763
win10腾讯文件夹在哪里 浏览:262
在网站前面加什么可以看会员视频 浏览:908
哪个读书app支持格式最全 浏览:322
魅族mx3提示网络可能会受到监控 浏览:308
如何判断复制文件是否完整 浏览:803
qq接收的语音文件在 浏览:408
手机qq禁止查看动态 浏览:923
如何用编程求解二重积分 浏览:366
在桌面上搜索不到文件夹 浏览:723
中外文专利网站有哪些 浏览:682
尖刀车端面槽怎么编程 浏览:70
电脑重装会把所有文件都删掉吗 浏览:982
java匿名内部类构造函数 浏览:573
如何ftp文件到linux 浏览:894

友情链接