Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
detect_envelope.c
Package: speaker_recognition.rar [view]
Upload User: bossps2lzz
Upload Date: 2022-07-07
Package Size: 522k
Code Size: 1k
Category:
DSP program
Development Platform:
C/C++
- /* Written by Sowmya Narayanan and Vasanthan Rangan
- *
- * detect_envelope.c
- *
- * This program will detect the envelope of input speech signal
- *
- *
- * The input will be the speech sample
- *
- *
- *
- *
- *
- *
- *
- */
- #define env_coeff 4000 /* / 32768 envelope filter parameter */
- int envelope = 0; /* current sample of the signal envelope (32-bit) */
- short detect_envelope(short sample)
- {
- short word1,word2;
- if (sample < 0)
- sample = -sample; /* rectify the signal */
- word1 = envelope >> 15; /* high-order word */
- word2 = envelope & 0x00007fff; /* low-order word */
- envelope = (word1 * (32768 - env_coeff)) +
- ((word2 * (32768 - env_coeff)) >> 15) +
- sample * env_coeff; /* envelope =
- envelope*(1-coeff) + sample*coeff */
- return envelope >> 15;
- }