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

编程如何启动录音

发布时间: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添加权限
阅读全文

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

热点内容
如何用编程求解二重积分 浏览:366
在桌面上搜索不到文件夹 浏览:723
中外文专利网站有哪些 浏览:682
尖刀车端面槽怎么编程 浏览:70
电脑重装会把所有文件都删掉吗 浏览:982
java匿名内部类构造函数 浏览:573
如何ftp文件到linux 浏览:894
win10文件夹的图片自动排列 浏览:155
安卓电脑文件管理器 浏览:512
联想手机k860刷机教程 浏览:356
oa删除已发文件 浏览:397
win7asp配置文件 浏览:362
java网页能做心跳机制 浏览:817
逆战文件应用在哪里 浏览:102
红头文件订书红线在哪里 浏览:851
excel怎么做文件头 浏览:703
为什么word找不到文件菜单 浏览:671
ios15安装后找不到描述文件 浏览:440
学编程怎么学最有效 浏览:873
通过wifi传文件到ipad 浏览:197

友情链接