Hello,
I have done one project. in this project, I have read sensor data and convert this data into an audio signal and transfer this audio signal to Bluetooth headphones.
So I have simply listened to sensor data on the headphone. But this audio voice has other background noise how can I remove this noise from my audio?
Thank You in advance.
But this audio voice has other background noise how can I remove this noise from my audio?
Don't think you can once it is on a recording, you must try to eliminate it at source.
Without any real details of your project no one can help you. Have you not spotted that in the 71 posts you have made so far?
Can you reread:-
How to use this forum
It will remind you about what you need to put when asking a question here.
Grumpy_Mike:
Don't think you can once it is on a recording, you must try to eliminate it at source.
Sir for this project I have used
- Arduino Uno
- Sensor
- Bluetooth Module
- Bluetooth Headphones.
I have connected the sensor with Arduino (I2C) and convert this sensor data into voice by using a command. have connected the Bluetooth module at Arduino PWM pin no 3.
sayQFloat(&voice, output, 0, true, true);
but when my code says output (Audio) it not give a clear voice.
So sir how can I remove this background noise.
There are many thousands of things which can be called a "Sensor" and many "Bluetooth modules". Please provide real details of your components. Links to datasheets or purchase websites for the specific components would help.
Steve
And be aware this is not an easy task, and pretty much impossible with a single "sensor".
but when my code says output (Audio) it not give a clear voice.
So sir how can I remove this background noise.
So we need a schematic, your code posted between code tags and a recording of what noise this is. It is certainly not background noise. But there may be ways of mitigating it.
slipstick:
There are many thousands of things which can be called a "Sensor" and many "Bluetooth modules". Please provide real details of your components. Links to datasheets or purchase websites for the specific components would help.Steve
I have used a Lightware distance sensor and Wireless Digital Bluetooth Audio Transmitter(Amazon)
Grumpy_Mike:
So we need a schematic, your code posted between code tags and a recording of what noise this is. It is certainly not background noise. But there may be ways of mitigating it.
#include <Wire.h>
#include "Talkie.h"
#include "Vocab_US_Large.h"
#include "TalkieUtils.h"
#include "Vocab_Special.h"
Talkie voice;
void setup()
{
Wire.begin();
Serial.begin(9600);
}
void loop()
{
// This is using address 0x6 which can be changed in the device settings.
Wire.requestFrom(0x66, 2);
if (Wire.available() >= 2)
{
int byteH = Wire.read();
int byteL = Wire.read();
float distanceInCM = byteH * 256.0f + byteL;
float distanceInMeter = (distanceInCM/100.0f);
if (distanceInMeter > 110);
{
sayQFloat(&voice, distanceInMeter, 0, true, true);
voice.say(sp2_METER);
Serial.println(distanceInMeter);
delay(500);
}
}
}
I have used a Lightware distance sensor and Wireless Digital Bluetooth Audio Transmitter(Amazon)
Amazon is a big place.
OK now the key thing that your software tells me is that you are using the Talkie library to generate your sounds. This uses a system known as LPC ( Linear predictive Encoding ) which is an ultra compression technique like an early MP3. Linear predictive coding - Wikipedia
By its nature it will produce audio artifacts, which is what you might be thinking is background noise. The way to tell is to just run one of the example files on an Arduino with nothing else going on. If you still here this "background noise" then it is coming from the Talkie library and there is nothing you can do about other than find some other way of generating your sound. Something like an SD card and the TMRpcm library
For full project details see here:- Arduino Wave Audio Player with SD Card - Simple Circuit.
If that is not the source of your background noise then please post a sound sample of your words with the background noise.
Just a couple of thoughts & comments...
Noise and other audio defects are easier to prevent than to correct. Even with the latest professional software, pros still record in soundproof studios with good equipment and radio & TV studios are soundproof, etc.
"Noise" is "unwanted sound". For example, if you are trying to record yourself playing guitar and the dog starts barking, the barking is noise and the guitar is the signal. If you bump the microphone with the guitar that's also noise. You can also get electrical noise from the electronics such as hiss, hum, or buzz, etc. If you are trying to record a dog barking then that's not noise. It's a philosophical definition/difference.
Noise is worse when there is a "silence" or a low-level signal. You might hear some hiss or hum with quiet signals but louder sounds will often mask (drown-out) the noise. Of course if you have a loud dog barking nothing is going to hide that.
"Distortion" is also unwanted sound added to the signal but it's usually worse when the sound is loud and it doesn't affect silence. The "classic" example" of distortion is if turn-up the volume and try to get 150W out of a 100 Watt amplifier, or if you scream into a microphone and overload the preamp. With silence there is no distortion.
Compression artifacts (from low-quality compression) are distortion that's a little different because the distortion isn't related to signal level (loudness). But, like other kinds of distortion it's not there with silence.
There is another special case called "quantization noise". Technically, it's distortion and it doesn't exist with silence. But, it sounds like noise and just like regular noise it's worse with quiet sounds, but it goes-away completely with digital-silence. It's related to bit depth and if you convert a high-quality recording to 8-bits you'll hear it.
Grumpy_Mike:
it is coming from the Talkie library and there is nothing you can do about other than find some other way of generating your sound. Something like an SD card and the TMRpcm library
For full project details see here:- Arduino Wave Audio Player with SD Card - Simple Circuit.
Hello Sir,
Thank You for your reply.
Sir, I continually measure distance so I have required many wave audio file which plays according to distance. my sensor range 100 meters. so I need a minimum 100 wave file that is store in the SD card.
I don't want to use SD card. I just want sensor output real-time converted into an audio file.
I also upload some examples shown in the below code. This code also gives the same background noise.
//#include <ArduinoSound.h>
//#include <Adafruit_ZeroI2S.h>
#include <digitalWriteFast.h>
#include <Talkie.h>
#include <TalkieLPC.h>
#include <TalkieUtils.h>
#include <Vocab_Soundbites.h>
#include <Vocab_Special.h>
#include <Vocab_Toms_Diner.h>
#include <Vocab_US_Acorn.h>
#include <Vocab_US_Clock.h>
#include <Vocab_US_Large.h>
#include <Vocab_US_TI99.h>
#include "Talkie.h"
#include "Vocab_US_Large.h"
#include "Vocab_Special.h"
Talkie voice;
void setup() {
}
void loop() {
voice.say(sp2_DANGER);
voice.say(sp2_DANGER);
voice.say(sp3_STORM);
voice.say(sp3_IN);
voice.say(sp3_THE);
}
my sensor range 100 meters. so I need a minimum 100 wave file that is store in the SD card
You are wrong.
You need far fewer than this, you make up the numbers from smaller samples. You need the samples for zero to nine, and then in tens from twenty to ninety. And then simply put together the relevant ones. Yes you have to do some messing about in the teens but that is less than ten special cases. So nowhere close to 100 samples.
This code also gives the same background noise.
So as I said in reply #8, it is an audio artefact of the LPC encoding and there is nothing you can do about it except find some other way of generating the audio.
don't want to use SD card. I just want sensor output real-time converted into an audio file
So find something other than Talkie.
Grumpy_Mike:
So find something other than Talkie.
Thank You sir for your guides.
Please suggest to me any other library which I can use in my project.
Please suggest to me any other library which I can use in my project.
I do not know of any method that fits your requirement of using no SD card.