Java-Gaming.org    
Featured games (91)
games approved by the League of Dukes
Games in Showcase (579)
games submitted by our members
Games in WIP (500)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  silence detection in java  (Read 1791 times)
0 Members and 1 Guest are viewing this topic.
Offline emmi12345

Junior Newbie




Java games rock!


« Posted 2004-06-11 11:24:38 »

hi guys,

could any one help me on silence detection i will be very thank ful

thx in adavance
Offline oNyx

JGO Coder


Medals: 1


pixels! :x


« Reply #1 - Posted 2004-06-11 13:28:28 »

You... check for the silence(!)... and then *gasp* do the stuff.

Roll Eyes

Seriously, if you want usefull answers you should provide all the details you can get.

Ah well... I tell you this... there are two kinds of "silence". Digital absolute - there is nothing - silence and sound from let's say line-in or a mic and there is no real noise. The former is easy to ckeck and the latter needs to be some kind of fuzzy conditions. So instead of checking for a zero volume you check for let's say a volume wich is lower than 5% (or any other treshold).

Whenever the one or the other type occurs you set a marker and if it lasts for a specific timespan you found a pause/silence.

弾幕 ☆ @mahonnaiseblog
Offline emmi12345

Junior Newbie




Java games rock!


« Reply #2 - Posted 2004-06-11 14:09:07 »

hi,

infact i am making a system, in which i will detect is clients mic is connected.

for that i have to check silence for some seconds.

if for that time i didnt get any signal thus i will give message of "mic unplug".

i am capturing data in bytes.

now wat u suggest?
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline swpalmer

JGO Coder




Where's the Kaboom?


« Reply #3 - Posted 2004-06-11 17:04:01 »

Check that the amplitude of the input data does not exceed some threshold for N samples where N is based on the duration of silence your are trying to detect.

What is hard about this?  Am I missing something?

Offline emmi12345

Junior Newbie




Java games rock!


« Reply #4 - Posted 2004-06-12 05:32:02 »

i am receiving data in bytes and how i configure the amplitude bcz it shows differernt values for same scenario.

if i got the value of byte for silence it would be very ease.


Offline swpalmer

JGO Coder




Where's the Kaboom?


« Reply #5 - Posted 2004-06-12 18:54:56 »

Are you using 8-bit samples?  (Typically these days you use 16-bit audio samples)

You need to know the format you have configured for the audio source.

E.g. signed vs. unsigned (w. offset), 8 or 16 bit.

Then it is easy.  for signed data silence is near 0,  for unsigned data silence is near the middle of the range.  Because of noise you will need to consider a band around the true silence value to be silence.

Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

xsi3rr4x (31 views)
2014-04-15 18:08:23

BurntPizza (28 views)
2014-04-15 03:46:01

UprightPath (43 views)
2014-04-14 17:39:50

UprightPath (26 views)
2014-04-14 17:35:47

Porlus (42 views)
2014-04-14 15:48:38

tom_mai78101 (64 views)
2014-04-10 04:04:31

BurntPizza (124 views)
2014-04-08 23:06:04

tom_mai78101 (224 views)
2014-04-05 13:34:39

trollwarrior1 (190 views)
2014-04-04 12:06:45

CJLetsGame (198 views)
2014-04-01 02:16:10
List of Learning Resources
by SHC
2014-04-18 03:17:39

List of Learning Resources
by Longarmx
2014-04-08 03:14:44

Good Examples
by matheus23
2014-04-05 13:51:37

Good Examples
by Grunnt
2014-04-03 15:48:46

Good Examples
by Grunnt
2014-04-03 15:48:37

Good Examples
by matheus23
2014-04-01 18:40:51

Good Examples
by matheus23
2014-04-01 18:40:34

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:22:30
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!