Recording revSpeak or an Alternative

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
deeverd
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 165
Joined: Mon Jul 16, 2007 11:58 pm
Location: Las Vegas, NV

Recording revSpeak or an Alternative

Post by deeverd » Wed Feb 10, 2016 11:13 pm

Hello Forum,

Below, I pasted the code I am trying to use to get LiveCode to record while the revSpeak command is speaking the words aloud from a text field, but I cannot get any recordings to appear on the desktop or anywhere. Honestly, I really don't care where it records something to. It would just be nice if there was a sound recording left somewhere afterwards.

I am using LiveCode version 7.0.6 with Windows 10.

I know that there have been some longstanding audio recording issues with Windows in the past. Does anyone know if those issues are still there or if there is anything wrong with the script I am using? Is there possibly something wrong with the way I use specialFolderPath?

As you can see, I even activated Quick Time in the suggested way but that still doesn't seem to help.

If the "record sound" function is just not possible yet in LiveCode 7, what would be the alternative to being able to record what is being said when revSpeak is speaking whatever text is in a field?

Code: Select all

on mouseUp
   
   put the qtVersion into tVersion -- Here, I am activating QT
   ask "Name This Sound Recording"
   put it into tRecordName
   
   set the recordInput to "imic" -- internal microphone
   ###set the recordInput to "emic" -- external microphone
   ###set the recordInput to "dflt" -- default
   set the recordCompression to "raw" -- default
   set the recordRate to 44.1 -- CD quality, default = 22.05
   set the recordChannels to 1 -- mono, 2 = stereo
   set the recordFormat to "wave"
   set the recordSampleSize to 16 -- 8 = default
   
   put the platform into tPlatform
   
   if tPlatform is "win32" then
      set the recordFormat to "wave"
      put ".wav" after tRecordName
   else
      set the recordFormat to "aiff"
      put ".aif" after tRecordName
   end if
   
   record sound file (specialFolderPath("desktop") & slash & tRecordName)
   wait 6 ticks   
   revSpeak word 1 to -1 of field "talkingField"

end mouseUp

I have wasted days on trying to get this to work and seem to have exhausted all the literature on this topic, all to no avail. Any suggestions on how to make this happen or what would be a good alternative will definitely be very appreciated.

All the best,
deeverd

LCNeil
Livecode Staff Member
Livecode Staff Member
Posts: 1223
Joined: Wed Oct 03, 2012 4:07 pm

Re: Recording revSpeak or an Alternative

Post by LCNeil » Mon Feb 15, 2016 4:06 pm

Hi Deevered,

There have been a few recording issues reported with Windows but there have been some fixed pushed in later versions of LiveCode.

Please try a more recent version to see if the issue is resolved. (e.g. LiveCode 7.1.2 RC2)

http://downloads.livecode.com/livecode/

If the issue still persists, please consider submitting a bug report with our Quality Control team as they will be able to investigate further-

http://quality.livecode.com

Kind Regards,

Neil Roger
--
LiveCode Support Team ~ http://www.livecode.com
--

deeverd
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 165
Joined: Mon Jul 16, 2007 11:58 pm
Location: Las Vegas, NV

Re: Recording revSpeak or an Alternative

Post by deeverd » Mon Feb 15, 2016 5:20 pm

Thanks Neil,

I'll give the newer version a try and report back.

All the best,
deeverd

deeverd
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 165
Joined: Mon Jul 16, 2007 11:58 pm
Location: Las Vegas, NV

Re: Recording revSpeak or an Alternative

Post by deeverd » Mon Feb 15, 2016 8:46 pm

Hello again,

I tested the previous code with no luck, and then changed the way the specialFolderPath works a bit to be able to set the name of the file, but still no luck. I probably didn't need to set the name of the file using a global variable, but I've been experimenting in any way that I thought it might work.

Also tried playing with various tests like "if the recording is true then beep 5" to see if the recording ever became true, but there were never any beeps. I tried changing "imic" to "emic" and back, but nothing.

When "answer tVersion" is uncommented, I can see that Quicktime is on and activated, so that doesn't seem to be the problem. I also have the latest Quicktime version.

Anyway, I think the slightly modified script is probably good in theory, which I'll post here so that when the record function does work fine for Windows OS, this script may be of some use to others.

Code: Select all

on mouseUp
   
   put the qtVersion into tVersion
   #answer tVersion -- Just testing it here
   wait 1 ticks
   
   ask "Name This Sound Recording"
   put it into gRecordName
   
   set the recordInput to "imic" -- internal microphone
   ###set the recordInput to "emic" -- external microphone
   ###set the recordInput to "dflt" -- default
   set the recordCompression to "raw" -- default
   set the recordRate to 44.1 # CD quality, default = 22.05
   set the recordChannels to 1 -- mono, 2 = stereo
   set the recordFormat to "wave"
   set the recordSampleSize to 16 -- 8 = default
   
   put the platform into tPlatform
   
   if tPlatform is "win32" then
      set the recordFormat to "wave"
      put ".wav" after gRecordName
   else
      set the recordFormat to "aiff"
      put ".aif" after gRecordName
   end if
   
   put specialFolderPath("desktop") & "/" into tPathToDesktop
   record sound file (tPathToDesktop & gRecordName) -- use the folderPath and combine it with the recordName and extension
   wait 10 ticks
   
   if the recording is true then
      send "mouseUp" to button "startSpeakingButton" in 20 milliseconds
   end if
      
end mouseUp

In the meantime, I'll just do some research to find out what is the best audio recording software I can buy to capture the sounds when revSpeak is talking.
All the best,
deeverd

ClipArtGuy
Posts: 253
Joined: Wed Aug 19, 2015 4:29 pm

Re: Recording revSpeak or an Alternative

Post by ClipArtGuy » Mon Feb 15, 2016 8:59 pm

deeverd wrote:
In the meantime, I'll just do some research to find out what is the best audio recording software I can buy to capture the sounds when revSpeak is talking.
All the best,
deeverd

Maybe check out Audacity. http://www.audacityteam.org/

deeverd
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 165
Joined: Mon Jul 16, 2007 11:58 pm
Location: Las Vegas, NV

Re: Recording revSpeak or an Alternative

Post by deeverd » Mon Feb 15, 2016 9:54 pm

Hello ClipArtGuy,

Thanks for the suggestion. I did check out Audacity's online help site and what I found was quite interesting...

According to Audacity, “Many manufacturers are making it increasingly difficult to record streaming audio by deliberately removing or hiding this functionality due to copyright concerns.”

It seems to be that the sound card is not allowing the recording, rather than there being a glitch with LiveCode. So now I need to find a software solution to get around that problem.

All the best,
deeverd

deeverd
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 165
Joined: Mon Jul 16, 2007 11:58 pm
Location: Las Vegas, NV

Re: Recording revSpeak or an Alternative

Post by deeverd » Mon Feb 15, 2016 9:59 pm

Hello Forum,

I just found this most useful link from Audacity that explains the many alternatives for "recording computer playback on Windows." This seems to be a definitive source:

http://manual.audacityteam.org/o/man/tu ... ndows.html

According to Audacity, they suggest two types of software programs to get around this issue. The first link below is a free program (soundLeech) and the link after it is a pay program (TotalRecorder) which has a Windows 10 version. Both are said to capture the sounds directly from the source, which makes it a higher quality recording than using the old stereo mix:

http://www.milosoftware.com/en/index.ph ... dleech.php

http://www.highcriteria.com/

After placing these links here, I downloaded the evaluation editions of both varieties of audio recording software. I had some difficulties with SoundLeech not recording everything but TotalRecorder worked like a charm. Even using the demo standard version, the recording sounded perfect.

Hopefully this helps anyone having a similar problem.

Cheers,
deeverd

Mary022
Posts: 1
Joined: Mon Dec 10, 2018 1:39 pm

Re: Recording revSpeak or an Alternative

Post by Mary022 » Mon Dec 10, 2018 3:06 pm

If the record sound function is just not possible yet in LiveCode 7. I can vouch that if you download Audacity it is safe software. I have been using this program to record audio vocals and guitar.

Post Reply

Return to “Getting Started with LiveCode - Experienced Developers”