# Ambient Noise Remover
Ambient Noise Remover is a Java program that removes ambient noise from an audio file. It uses the multidimensional Kalman Filter to estimate the positions of the ambient noise in an inputted audio file and the Java Sound API to remove it from the sound file. It then outputs a new file with removed ambient noise.
## Motivation
Communication applications, such as Telegram, Signal, Discord, and Skype, automatically remove background noise during video and voice calls as part of their software, before the sound reaches the recipient. In my project, I wanted to do what they were doing, just in an audio file rather than incoming sound.
## Getting Started
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
### Prerequisites
Ambient-Noise-Remover uses the Maven Dependency Management System to store and update dependencies and version the software. To install Maven, go to their [website](https://maven.apache.org) and download it.
#### Maven Dependency Management System
Run
```
mvn -v
```
to make sure it is configured correctly.
#### Understanding of the Kalman Filter
Before writing code for or reading code in this repository, you need to understand how the one dimensional and multidimensional Kalman Filter works. I suggest the following resources:
* Background Info: https://www.kalmanfilter.net/background.html
* One Dimensional Kalman Filter: https://www.kalmanfilter.net/kalman1d.html
* Multi-Dimensional Kalman Filter:
- https://www.kalmanfilter.net/kalmanmulti.html
- https://www.vectornav.com/resources/kalman-filters
### Installing
Install the Maven dependencies for this project
```
mvn install
```
To see the program in action, find background heavy audio files and place them in data. Then edit the file path inside the main method of [AmbientNoiseRemover.java](src/main/java/com/varunsingh/ambientnoiseremover/AmbientNoiseRemover.java)
## Running the Tests
To run the tests, enter `mvn test` in the command line. You can also use the features of your IDE or code editor if it has a GUI for tests. The project currently only has Unit Tests.
### Unit Tests
The WaveFormTest class tests the WaveForm class and is important for making sure the methods that manipulate the waveform function correctly
```
@Test
public void testInvert() {
byte[] firstByteArr = { 1, 0, -86, 124 };
byte[] actualInversion = new WaveForm(firstByteArr).invert().getAudioData();
assertArrayEquals(new byte[] { -1, 0, 86, -124 }, actualInversion);
}
```
The kalmanfilter test package tests all estimation algorithms from the kalmanfilter package. These are important in making sure the predicted positions and byte data that will be removed is correct.
```
@Test
public void testVelocityStateUpdateEquation() {
double result = KalmanFilterEquations.useVelocityStateUpdateEquation(
previousStateEstimate,
previousVelocityEstimate,
BETA_FILTER,
measurement,
5
);
assertEquals(expectedVelocityEstimate, result, 0.1);
}
```
### Coding Style Tests
The Coding Style tests will test to make sure the right method bracket style is used.
```
Give an example
```
## Deployment
Ambient-Noise-Remover is a console program runnable as a JAR file on Windows, Mac, and Linux. There is currently no web version, GUI, or mobile app that hosts, displays, or runs this project.
## Built With
* [Java](https://www.java.com/en/) - The language used
* [Maven](https://maven.apache.org/) - Dependency Management System
* [Java Sound API](https://www.oracle.com/java/technologies/java-sound-api.html) - The API for manipulating the sound
## Contributing
Please read [CONTRIBUTING.md](CONTRIBUTING.md) for details on our code of conduct, and the process for submitting pull requests to me.
## Versioning
I use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/Borumer/Ambient-Noise-Remover/tags).
## Author
I, Varun Singh, did the research and wrote the software.
## License
This project is licensed under the GNU General Public License - see the [LICENSE](LICENSE) file for details
没有合适的资源?快使用搜索试试~ 我知道了~
Ambient-Noise-Remover-master.zip
共58个文件
java:47个
yml:3个
md:2个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 196 浏览量
2024-04-07
21:06:41
上传
评论
收藏 55KB ZIP 举报
温馨提示
Ambient-Noise-Remover-master.zip
资源推荐
资源详情
资源评论
收起资源包目录
Ambient-Noise-Remover-master.zip (58个子文件)
Ambient-Noise-Remover-master
.editorconfig 254B
.travis.yml 69B
_config.yml 25B
pom.xml 3KB
.github
workflows
maven.yml 577B
.gitattributes 86B
src
test
java
com
varunsingh
kalmanfilter
OneDimensionalKalmanFilterTest.java 3KB
AlphaFilterTest.java 2KB
KalmanFilterMatricesTest.java 81B
KalmanFilterEquationsTest.java 3KB
MultiDimensionalKalmanFilterEquationsFactoryTest.java 104B
AlphaBetaGammaFilterTest.java 2KB
AlphaBetaFilterTest.java 2KB
linearalgebra
VectorTest.java 67B
MatrixTest.java 5KB
MatrixInverseOperationTest.java 1KB
MatrixCovarianceOperationTest.java 765B
soundmanipulation
AudioSampleSetTest.java 84B
AudioByteSetTest.java 183B
SimpleWaveTest.java 518B
ambientnoiseremover
NoiseDistinguisherTest.java 663B
AmbientNoiseRemoverTest.java 128B
main
java
com
varunsingh
kalmanfilter
KalmanFilter.java 229B
EstimationFilter.java 190B
MultiDimensionalKalmanFilter.java 5KB
SystemCycle.java 5KB
Update.java 624B
AlphaBetaGammaFilter.java 3KB
Updateable.java 709B
Propagation.java 739B
Propagatable.java 990B
KalmanFilterEquations.java 2KB
SystemCycleVector.java 2KB
AlphaBetaFilter.java 3KB
OneDimensionalKalmanFilter.java 3KB
CovarianceMatrixSet.java 769B
MultiDimensionalKalmanFilterParameterFactory.java 3KB
AlphaFilter.java 1KB
linearalgebra
Matrix.java 7KB
MatrixCovarianceOperation.java 1KB
MatrixOperation.java 98B
Vector.java 3KB
MatrixInverseOperation.java 4KB
soundmanipulation
AudioFileManager.java 907B
AudioByteSet.java 1KB
SimpleWave.java 1KB
Wave.java 157B
AudioSampleSet.java 6KB
ambientnoiseremover
UserInterface.java 2KB
NoiseDistinguisher.java 1KB
BitwiseSandbox.java 778B
LevelMeter.java 5KB
AmbientNoiseRemover.java 7KB
LICENSE 15KB
CONTRIBUTING.md 799B
.gitignore 386B
README.md 4KB
a.txt 0B
共 58 条
- 1
资源评论
手把手教你学AI
- 粉丝: 7938
- 资源: 4788
下载权益
C知道特权
VIP文章
课程特权
开通VIP
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功