473,395 Members | 1,972 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Voice Recorder For Pocket PC (VB.NET version)

Okay we have here a VB.NET version of the .net compact framework voice
recorder sample that uses open net CF
c# version at:
http://www.opennetcf.org/forums/topic.asp?TOPIC_ID=79

THIS CODE CREATES AN INSTANCE OF A VOICE RECORDER, but now how do you
get it to record, save, play back, etc?

'
------------------------------------------------------------------------
-----
' NOTES
'
------------------------------------------------------------------------
-----
' Q: Once we have a voice recorder object, how do you then pass messages
to it??
' A: Im working on that... Essentially the sendmessage api function will
need to
' be p/invoked. The voicerecordercreate function has returned the hwnd
so
' messages can be sent to this. The voice recorder messages are
documented in
' the sdk
' I haven't had much luck with the sendmessage function - everytime I
try to
' send a message to the voicerecorder, it just closes the
voicerecorder.....
'
' I got this code to run. This code seems to record to files in \\My
' Documents\~VRec_* where * is a number.
' Alan, did you install the Speech.NET or Speech API?
'
' The files ~VRec_* are temporary files that the voice recorder uses to
store
' the data while it is recording. Sometimes, depending on how the
recorder is
' terminated, they get converted to recording*.wav
'
' Take a look here:
' http://www.innovativedss.com/forums/...sp?TOPIC_ID=80
' for an example of playing .WAV sounds.

'
------------------------------------------------------------------------
-----
' CREDITS
'
------------------------------------------------------------------------
-----
' ported to vb.net by
' Tom Shelton (to*@YOUKNOWTHEDRILLmtogden.com)
' Off the top of my head... I'm not sure why the original code is using
' unsafe code. There doesn't seem to be anything used that would require
that
' - but, I don't know much about the Pocket PC environment. If the
unsafe is
' required for some reason on PPC, then you have to use C#.
' with additional help from
' "Ken Tucker" <vb***@bellsouth.net>

'
------------------------------------------------------------------------
-----
' THE CODE
'
------------------------------------------------------------------------
-----
Imports System
Imports System.Data
Imports System.Runtime.InteropServices
Public Class VoiceRecorder
<StructLayout(LayoutKind.Sequential)> _
Protected Structure CM_VOICE_RECORDER
Public cb As Integer
Public dwStyle As Integer
Public xPos As Integer
Public yPos As Integer
Public hwndParent As IntPtr
Public id As Integer
Public lpszRecordFileName As String
End Structure
<DllImport("voicectl.dll", CallingConvention:=CallingConvention.Winapi)>
_
Private Shared Function VoiceRecorder_Create _
(ByRef myVoiceRecorder As CM_VOICE_RECORDER) As IntPtr
End Function
Private voicerec As CM_VOICE_RECORDER
Private handle As IntPtr
Public Sub New()
With voicerec
.cb = Marshal.SizeOf(voicerec)
.lpszRecordFileName = "\My Documents\VoiceControl.wav"
.xPos = -1
.yPos = -1
End With
End Sub
Public Sub Show()
handle = VoiceRecorder_Create(voicerec)
End Sub
End Class

'************************************************* **********************
***************
'code for Button1 codebehind to record & save a voice memo to
"myfile.wav"
'currently we can only create an instance of VoiceRecorder
'how do you get it to record, save, play back, etc?
'************************************************* **********************
***************
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim VoiceRecorder1 As VoiceRecorder
VoiceRecorder1 = New VoiceRecorder
'VoiceRecorder1.???
End Sub


*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 20 '05 #1
0 1910

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Mad Scientist Jr | last post by:
Can someone convert this code to vb.net? it is a voice recorder for pocket pc. many thanks ! source: http://www.opennetcf.org/forums/topic.asp?TOPIC_ID=62 the code: using System;
5
by: Oliver Huppert | last post by:
Hi all, can someone tell me what I need to develop applications for PPC2003 with C#? I have read several meanings about this topic. Do I need Visual Studio .NET or is Visual C# .NET Standard...
1
by: Jon Lehrer | last post by:
Hoping for some advice: I would like to write some code that controls the "window's sound recorder" that I embedded in my program with OLE. I can do this with Excel...
1
by: Mad Scientist Jr | last post by:
hi can someone possibly convert this to vb.net ? it is c# code that lets the pocket pc access the voice recorder... many thanks... source: wapboy...
5
by: Mad Scientist Jr | last post by:
I'm trying to record a voice memo on a Pocket PC (2000) from VB.NET (smart device application from vs.net 2003). Tom Shelton did an initial conversion to VB.NET which I am trying to run, but am...
2
by: Kent Briggs | last post by:
I'm a Delphi programmer with a need to create a Pocket PC app. Since full support for the .NET Compact Framework won't be added to Delphi for another year, I'm looking at learning VB. Apparently I...
1
by: Fab | last post by:
Hi, What is the best (or simple!) way to make some voice recording in C# ? Thanks.
3
markmcgookin
by: markmcgookin | last post by:
Hi Folks, I was hoping to get a little help here. I have recently foun the following code (here: http://www.opennetcf.org/forums/topic.asp?TOPIC_ID=160) public class VoiceRecorder { ...
5
by: Terry Metcalfe | last post by:
I have an Asus A696 pocket PC. I have written a small test program in VB6 called "Pocket PC" and compiled it just as I would normally do to run on my desk top. It runs on my desk top perfectly...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.