PodcastsNyhederHacker Public Radio

Hacker Public Radio

Hacker Public Radio
Hacker Public Radio
Seneste episode

278 episoder

  • Hacker Public Radio

    HPR4658: Audio Revisited

    10.06.2026
    This show has been flagged as Clean by the host.

    01 Introduction







    This is a follow up to my 4 part series on simple podcasting.



    In this episode I will discuss a number of experiments with audio filtering.



    These experiments were inspired by comments by listeners and by other discussions about audio on HPR.



    I am not an audio expert, so I am doing this partly in order to learn something, but mainly in order to have a bit of fun.



    I hope that you find this entertaining as well.







    In a comment on the first episode a listener mentioned something called Solocast and said that the method bore a resemblance to the method that I was using.







    Here is his comment







    --------------------



    02



    Comment #3 posted on 2026-04-03 07:49:58 by Reto



    It reminds me about Solocast







    Hi Whiskeyjack,



    I really liked your podcast and the topic. I cannot remember about your last, but the sound quality of this one was good on my mobile speakers :)







    The concept reminded me about the program from Norrist (another host on HPR), while similar does it have some differences HPR 3496 https://hackerpublicradio.org/eps.php?id=3496







    As I am not on the future feed, I look forward to your next episode.







    Cheers, Reto







    --------------------



    03



    End of comment.







    I did not recall having heard the episode on Solocast, but this sounded very interesting. Solocast was in HPR episode 3496 and was released by norrist on the 27th of December 2021.







    I listened to that episode and does indeed use use the same basic concept of recording short segments of audio and combining them later instead of creating one big recording and editing it with an audio editor.



    04



    The main difference is that the work flow that I described involves a lot of manual steps, while Solocast is a short Python program that automates the entire process of presenting your script, recording the segments, combining the segments, and filtering and normalizing the result.







    I won't try to describe Solocast in detail, instead I would recommend just listening to HPR episode 3496 to get norrist's explanation directly.







    --------------------



    05



    While I wanted to make sure that I credited norrist with having come up with this concept four years before I did, this won't be the focus of this episode.







    Instead I will talk about audio filtering and various experiments that I ran on several different methods.



    06



    While looking at the source code for Solocast I noticed that it used a filtering method that resembled one used by Jivetalk, a podcast production program that caught the attention of one of the HPR community news presenters.







    This method involves taking a sample of quiet audio where there is no speaking taking place, and then using this as input to a noise reduction filter which is applied to the voice recording.



    The filter subtracts the quiet sample from the voice audio, which should theoretically remove the ambient noise.



    07



    I decided to apply this method to a number of different audio test recordings which were recorded under different circumstances using different hardware.



    In this way I could see if the method worked equally well under all circumstances or if there were some sorts of noise which it was suited to and some sorts that were not.



    08



    While I was at it, I also picked several other filter methods to see how they worked as well.



    Potentially, some methods may be better under some conditions while other methods were better suited to others.







    --------------------



    09



    I won't present all of my experiments, as that would be a bit dull to listen to.



    Instead I will describe each method and then present audio samples which illustrate my conclusions.







    There are two pieces of audio software involved, both of which were also used in my series on simple podcasting.







    10



    The first is Sox, spelled s o x , and which is short for Sound Exchange.



    Sox is a command line program for audio manipulation.



    Sox is Free Software, released under the GPLv2 or later.







    The other is FFMPEG, which is also a command line program.



    FFMPEG is also Free Software, released under the LGPL V 2.1 or later, and GPL v 2 or later.







    Sox actually uses FFMPEG for certain operations.







    --------------------







    11 Audio Hardware







    For recording hardware I used the following.







    12 Maxwell Headset



    The first is a cheap Maxwell headset that has an electrical noise problem. Unfortunately I don't have a model number for this headset.







    I described this hardware, the noise problems that I had with it, and how I created filters to deal with the noise in my series on simple podcasting.



    Briefly though, this is a headset that has a build in microphone on a boom which allows the microphone to be positioned close to the mouth.



    It connects with a USB cable.







    13 Borne Earpiece and In-line Microphone



    This is a set of earplugs that go in your ears and connected by wires and a very small microphone built into a small bulge in the cable. It connects using a 3.5mm jack.



    The model number seems to be BUD250-BL.







    14 XTrike Headset



    This is a gaming headset similar to the Maxwell headset described above.



    The model number is GH-510



    It uses a USB connection.







    15 Yanmai Condenser Microphone



    This is a microphone that comes with a small tripod stand.



    The model number is SF-910



    It uses a 3.5mm audio jack.







    --------------------







    16



    This is not a review of the hardware.



    Rather, I was trying to create audio problems so that I could test ways to fix them.



    Therefore, do not take the above list as a recommendation of what to buy.



    However, you can see that I am not using any expensive audio hardware.



    If you want to make an HPR podcast, you do not need professional level hardware.











    --------------------







    17 Audio Samples







    The audio samples are as follows







    18 Quiet



    This was recorded in a quiet environment at my desk.



    This is my normal podcasting environment and represents optimal conditions.



    The main reason for this method is to see how the various filter methods perform when dealing with the electrical noise from the Maxwell headset.







    19 Small fan



    This is a small USB powered table fan approximately 10 cm in diameter.



    It was located roughly 40 cm or less to the left of the microphone, although this varies depending on the microphone.







    20 Traffic



    This was along a busy street with traffic noise in the background.











    --------------------







    21 Filter Methods







    Sox noisered Filter with Audio Profile







    This method uses the Sox noisered filter. Here is a brief quote from the Sox documentation on this filter.







    Quote







    Reduce noise in the audio signal by profiling and filtering. This effect is moderately effective at removing consistent background noise such as hiss or hum. To use it, first run SoX with the noiseprof effect on a section of audio that ideally would contain silence but in fact contains noise - such sections are typically found at the beginning or the end of a recording.







    End of quote







    For these tests I recorded a separate noise profile to go with each test.







    --------------------







    22 Basic Manual Filter



    This is a basic high and low pass filter pair based on the work I had done in my previous series on simple podcasting.



    However, based on the tests that I have done for this episode, I decided to get a bit more aggressive in terms of filtering.



    I use a high pass filter of 120 Hz, and low pass filter of 8 kHz.



    The each filter is then applied twice to increase its effect.



    I also added band reject filters to deal specifically with 50 and 60 Hz line noise.







    --------------------







    23 Complex Manual Filter



    This uses the manually constructed filter described in my series on simple podcasting.



    This uses the basic manual filter plus a series of custom bandreject filters to fix specific noise problems with the Maxwell headset.







    --------------------







    24 FFMPEG afftdn Filter



    The documentation describes this as



    "Denoise audio samples with FFT."











    --------------------







    25 FFMPEG arnndn Filter



    The documentation describes this as



    "Reduce noise from speech using Recurrent Neural Networks."











    --------------------







    26 FFMPEG agate Filter



    I will pronounce this as "agate" for convenience.



    The documentation describes this as



    "A gate is mainly used to reduce lower parts of a signal.



    This kind of signal processing reduces disturbing noise between useful signals."







    --------------------







    27 Method







    The experimental method used was to take each noise sample and apply the different filter methods to it.



    Where there are parameters which can be adjusted, a script was used to generate a series of different sample files with different parameter values.



    Not all possible parameters were experimented with, as the goal is to see which method produces what sorts of results under different circumstances, not to get the best possible result for the samples that I happen to have.







    The method in each case was as follows







    28 Step 1



    Convert the audio file to FLAC if it is not already in that format.







    29 Step 2



    Apply a basic high and low pass filter described previously to each sample.







    The reason for this basic filtering is that it eliminates at least some undesired noise in a fairly fool proof manner, leaving less for the more advanced filter to deal with.



    This should allow for a better test of the filter under realistic conditions.







    30 Step 3



    Apply the noise reduction filter being tested.







    31 Step 4



    Normalize the filtered sample to 17 LUFS according to the EBU R128 standard.



    The EBU standard is described in my series on simple podcasting.



    Normalizing adjusts the audio signal to a desired loudness level.



    This allows for more more consistent sound levels and allows us to hear the results under realistic conditions.



    I normalize the audio individually for each sample as different recording hardware requires different amounts of loudness adjustment.



    This is different from the typical podcast process where normalizing takes place as the very last step in the process, but it was necessary in this case.







    32 Step 5



    Concatenate selected sample audio files to one another to allow for better review and comparing.







    --------------------







    33 Results







    The results are grouped according to the type of noise which is being mitigated. This allows for easier comparison of the effectiveness of each technique under different circumstances.







    I have only picked a few examples of interest out of the numerous experiments that I conducted.







    --------------------











    34 Quiet Recording Environment with Maxwell Headset







    This compares how well the various filtering methods work on the noise induced by the electronics in the Maxwell headset.



    This electronic noise consisted of a noise spike every 1 kHz.



    This should be representative of electronic noise caused by problems in recording hardware.







    35 Manual Filter







    The manual filter applied a narrow band reject filter every 1 kHz from 1 kHz to 12 kHz.



    This completely removed the otherwise audible whine caused by the noise.











    36 FFMPEG afftdn







    This method allows for setting a noise floor and then specifying how much the noise floor should be reduced by.



    The method is very sensitive to getting the noise floor correct for that recording. Set the floor too low and nothing happens. Set it too high, and some distortion results.







    However it seemed to be moderately effective, but it would seem to require checking it and possibly adjusting it each time it is used.











    37 FFMPEG agate







    This method allows setting a noise floor and then suppressing all sound which falls below that level.



    This method is very sensitive to getting the noise floor correct for that recording.



    If set too low (or quiet), it is ineffective.



    If set too high (or loud), it distorts words which come after a pause, which would typically be between sentences.







    38



    When set correctly, it completely removes noise in the silences between sentences.



    However, the noise is still audible during speech.



    This is because the noise in this case is a higher frequency than normal speech, and so stands out more.



    It may not be a significant problem for noise which is closer to the main vocal frequency band.







    Overall, this method is not suitable for this particular problem.











    39 FFMPEG arnndn







    This method used the standard model.



    A variety of different noise reduction models are available.



    I only tested it with one, std.rnnn







    It does not seem to introduce much distortion in the voice signal even with a high amount of mix parameter.







    40



    However, it is only slightly effective at removing the whine from the signal, even with a high amount of mix parameter.







    Overall, this method does not appear to be useful for this sort of noise problem.











    41 Sox noisered Filter



    This was effective in removing noise between words, but noise can be heard while words are being spoken. It was better than agate however.











    42 Overall Conclusion for the Maxwell Headset Noise







    When dealing with narrow noise bands that occur at known frequencies, the manual filter is leagues ahead of any of the other tested alternatives.







    43 Sample Audio



    Here is a sample audio recording showing the best overall results



    The sample is repeated, first with only basic low and high pass filtering, and then with the manually constructed filtering.



    In the first sample you should hear a high pitched background whine.



    In the second sample, the high pitched whine is completely removed.







    44 (Audio sample inserted here.)











    --------------------







    45 Traffic Noise







    This was recorded using the Borne in-line microphone connected to a mobile phone while walking along beside a busy street.



    This was in dry cool spring weather, and the road was paved with asphalt.



    This should be reasonably representative of podcasting while walking outdoors in a noisy environment.











    46 Basic Manual Filter



    This used the basic manual filter with high and low pass filters. This did nothing very useful in this case as the signal was already filtered within those limits by the recording hardware anyway. The low sample rate of 8 kHz in the phone limited the upper frequency to 4 kHz. Recall that the sample rate has to be twice the highest frequency that you want to detect.







    Overall, this is not suitable for this sort of problem.











    47 FFMPEG afftdn







    With a high noise floor, background noise is reduced, but not eliminated. There was not much distortion in the voice.







    This is only slightly useful for this sort of problem.











    48 FFMPEG agate







    With a high threshhold, background noise is reduced, but not eliminated. There was some distortion in the voice.



    The background noise could also be heard when speaking, but because the frequency of the background signal was similar to the louder voice signal, it was not as noticeable as it would have been if the two were very different.







    This is moderately useful for this sort of problem. It may be more useful in situations where the background noise was not quite as loud.











    49 FFMPEG arnndn







    With high amounts of noise reduction, much of the background noise is suppressed, but there is not a lot of distortion in the voice.



    The background traffic noise is still present, but is significantly less.







    This offers only a moderate improvement.











    50 Sox noisered Filter



    With small amounts of noise reduction voice is clear but traffic noise is present as a very significant continuous warbling sound in the background.



    This is no improvement on the original and in fact could be seen as making it worse.



    With moderate amounts of noise reduction, traffic noise is mostly gone, but there are still various squeaks present. Voice is noticeably distorted.



    With large amounts of noise reduction, traffic noise is gone but voice is highly distorted.







    This is moderately useful for this sort of problem, but requires careful adjustment.











    51 FFMPEG arnndn Followed by FFMPEG agate



    This combined two different filters.



    First, it used arnndn to suppress the background noise to a lower level without much voice distortion.



    Then it applied the agate filter to suppress the noise levels between words still further.



    This used the same amount of mix and threshold as was found to be most effective when each of these filters was used on its own.



    The background noise is almost completely gone while distortion of the voice signal is low.











    52 Overall Conclusion for Traffic Noise



    The arnndn combined with agate filters was the most successful at suppressing background noise while limiting the amount of voice signal distortion.







    53 Sample Audio



    Here is an audio sample for what I felt to be the best overall results, the arnndn filter combined with the agate filter.



    First is the original audio with basic filtering.



    This is followed with the same audio after being passed through the arnndn and agate filters.







    54 (Insert arnndn plus agate audio sample here)







    55 Another Sample



    Here is a second audio sample showing the Sox noisered profile based filter.



    I have included this to show how a profile based filter can make things worse if you are not careful how you use it.



    This repeats the test audio 4 times.



    The first is with basic filtering only.



    The second uses low amounts of noise reduction.



    The third uses moderate amounts of noise reduction.



    The fourth uses high amounts of noise reduction.







    56 (Insert noisered audio sample here)















    --------------------







    57 Small Fan Noise with Yanmai Microphone







    This was recorded using the Yanmai condenser microphone.



    A small fan was set up behind and to the left of the microphone.



    This is intended to represent situations where someone may have a fan or air conditioner running in the background due to hot weather, or has a loud computer fan.







    58



    A condenser microphone was used for this test as they are more prone to picking up unwanted noise.



    However, for practical recording purposes, this sort of microphone is unsuitable for this type of environment.







    59 Basic Manual Filter



    This used the basic manual filter with high and low pass filters.



    This did nothing useful as the fan noise was in the same frequency range as the voice signal.



    This may be of more help in cases where the noise is below the 120 Hz cut off used in the low pass filter.











    60 FFMPEG afftdn



    With high amounts of noise reduction, much of the background noise is suppressed, but there is some distortion in the voice.



    The background fan noise is still present, but is significantly less.



    Overall this is moderately effective.







    61 FFMPEG agate



    This was effective in removing noise between words, but noise can be heard while words are being spoken.



    However, this was a small voice sample and it is possible that more problems could occur.



    With less fan noise than was in this sample this technique may work much better.











    62 FFMPEG arnndn



    With high amounts of noise reduction, much of the background noise is suppressed, but there is not a lot of distortion in the voice.



    The background fan noise is still present, but is significantly less.



    Overall this was fairly effective.







    63 Sox noisered Filter



    With small amounts of noise reduction voice is clear but fan noise is present as a slight warbling sound in the background.



    With moderate amounts of noise reduction, fan noise is gone, but voice is somewhat distorted.



    With large amounts of noise reduction, fan noise is gone but voice is very distorted.







    64



    In general this method is fairly successful at dealing with this sort of problem.



    However, there is a trade off between background noise and voice quality.



    Getting that trade off correct takes experiment and judgment for each specific situation.







    65 FFMPEG arnndn Followed by FFMPEG agate



    This combined two different filters.



    First, it used arnndn to suppress the background noise to a lower level without much voice distortion.



    Then it applied the agate filter to suppress the noise levels between words still further.



    This got rid of virtually all of the background noise between words.



    If you listen carefully however, there is a slight buzzing sound in the voice signal.







    66 Overall Conclusion for Fan Noise with Yanmai Microphone.



    Of the methods tested, the arnndn followed by agate filter seemed to offer the most improvement for the least effort and least voice distortion.



    The arnndn filter on its own seemed the next most preferable to me despite leaving some fan noise in the background.







    67 Audio Sample



    Here is an audio sample for what I felt to be the best overall results, the arnndn filter combined with the agate filter.



    First is the original audio with basic filtering.



    This is followed with the same audio after being passed through the arnndn and agate filters.















    68 (Insert audio sample here)







    --------------------







    69 Small Fan Noise Recorded with Headset







    The following is an observation rather than a filtering technique.



    When a recording was made using the Maxwell headset and listened to on the headset later or with speakers, the fan was virtually inaudible.



    When the same recording was listened to with the XTrike headset, it was barely audible with careful listening and only identifiable as a fan because I knew it was there.







    70



    In situations where there is ambient noise, the best noise reduction technique is probably to move the microphone as close to your mouth as possible, although not directly in front of it, and reduce the gain if there is a gain adjustment in the microphone.



    This will work far better than trying to remove the noise later.



    If you are recording an HPR episode at a desk, then an inexpensive headset with boom mike may do the job just fine with minimal effort and expense.







    --------------------







    71 Conclusions







    I have tested three noise scenarios -







    Electronic noise in the audio hardware at specific frequencies.







    Recording outdoors with an inline microphone in a noisy traffic environment.







    A noisy fan creating background noise in an office.







    My conclusions on these are as follows.







    72 Electronic Noise in the Audio Hardware at Specific Frequencies



    If you can use Audacity or some other means to find the frequencies which are causing the noise, the best solution, assuming you don't just replace the hardware, is to manually construct filters to remove those specific frequencies.



    This is the safest solution in terms of only doing what you tell it to and not producing unexpected surprises some time down the road when something changed in the environment.







    73



    If you are looking for a fairly automatic filtering method, the Sox noisered profile based filter seems to work fairly well.



    There is an equivalent filter in ffmpeg, but I did not include that in my experiments as it is harder to use in a script because it does not use a separate noise profile file.











    74 Recording Outdoors with an Inline Microphone in a Noisy Traffic Environment.







    In this situation, the FFMPEG arnndn combined with agate filters seem to be the most successful.







    The Sox noisered filter may work, but at the cost of more distortion in the voice than is seen in the other methods.







    75



    An inherent problem with any profile based noise reduction method is that if the background noise is not constant, which it seldom is in that sort of environment, the profile may not represent the background noise which is present later on in the recording.



    This risks adding more distortion in the voice as the profile and later environments diverge.







    76



    However, for this application a different microphone that provided a better recording would appear to be advisable.



    A solution which brought the microphone much closer to the mouth and so resulted in a better ratio of voice signal compared to background noise would appear to be necessary, after which the question of what sort of noise reduction to use would need to be re-evaluated.











    77 A Noisy Fan Creating Background Noise in an Office.







    The Sox noisered filter and the FFMPEG arnndn, afftdn, and agate methods all work to some degree.



    However, they all need correct selection of parameters to achieve the proper results.







    When I compared all four methods side by side, I found the arnndn combined with the agate filter to be preferable in terms of the trade off between background noise reduction and distortion of the voice signal.



    The arnndn filter on its own seemed the next most preferable to me despite leaving some fan noise in the background.







    78



    However, that is a subjective judgment of a specific noise sample when recorded using a specific microphone.



    Keep in mind though that many listeners will not be listening in an idea environment.



    They may be doing things where background noise is present rather than in a very quiet room and so may find a small amount of background noise in the recording to be less of a problem than distortion in the voice signal which may make some words harder to understand.







    79



    When I conducted the same experiment recorded with the XTrike headset I found that arnndn seemed to offer no noticeable improvement.



    This may be because the amount of audible fan noise was far less with the XTrike headset to begin with.



    In other words, there is no single best solution here, and you may have to be prepared to try different options to see which one works in your situation.



    The important thing is to avoid making things worse by applying filtering that is not appropriate for that situation.







    The best method may be to use a recording method that doesn't pick up the fan noise to begin with.



    This can include just using a gaming headset with boom mic.







    80



    I have one final observation on this point regarding headsets.



    The Maxwell headset has a foam cover over the microphone while the XTrike headset does not.



    There was some slight audible wind buffeting noise picked up by the XTrike headset that was not observed with the Maxwell.



    This seemed to cause particular problems with the Sox noisered profile based filter, as this noise was irregular and after filtering would show up as a warbling sound.



    If you use a headset and plan to use it in conjunction with a fan, it may be advisable to apply some sort of wind cover over it.











    81 Combining Complex Filters



    In several cases I found that combining several complex filters offered better results than using any single one on its own.







    The basic strategy though is to first use a method which is good at reducing undesirable noise without introducing excessive voice distortion.



    Then apply a different filter which is good at reducing small levels of background noise to an even lower level while affecting the voice signal as little as possible.



    This uses the relative strengths of different filter types to compensate for the weaknesses of the other.







    82



    Different combinations of filters were most effective for different types of problems.



    I did not try all possible combinations however.



    Perhaps a further exploration of this would be worth doing in a later podcast.











    --------------------







    83 Case Study - Noise in Another HPR Episode Audio







    In the comments to my second episode on Simple Podcasting (which is HPR4618) where I discussed basic filtering, a couple of listeners brought up an interesting point.







    Antoine mentioned "declicking" in a post.







    --------------------







    Vance replied



    84



    Antoine, thanks for mentioning the click removal capability in Audacity! While I already knew about its noise removal filter, I wasn't aware it also had click removal.







    It might have helped me for HPR4637, where some sort of electromagnetic signal was picked up by my microphone/recorder, a Zoom H2 (the tapping sound was *not* present in the room where I recorded).







    While click removal does seem to distort speech when applied to it (though to my ears, it doesn't sound as weird as when noise removal is done with speech), I could have applied the filter only to the pauses, where the "tapping" is most noticeable. I will consider doing this in the event that I'm not able to eliminate the source of interference in the future, which would be the best way to go.







    --------------------



    85



    End of quote.







    I found this interesting as it sounded like another audio problem that could be experimented with.







    I found a sample of the episode which had the clicks and cut a copy of that segment out to experiment with.



    These sounds are a series of clicks, or "ticks" would be another way to describe them, in the quiet part of the audio between sentences or phrases.







    86



    Next I used Audacity to study the sound spectrum.



    I found a massive 60 Hz noise spike.



    However, my speakers won't reproduce sound that low, and filtering this out didn't reduce the clicks.



    The clicks turned out to be bursts of noise across the 100 to 800 Hz band, which is right where the main vocal band also is.



    This makes it difficult to filter based on frequency.



    The most promising approach would seem to be to filter based on sound level.







    87



    I tried all of the individual audio filter techniques mentioned in the other experiments above.



    None produced satisfactory results except for agate, which makes quiet audio quieter.



    This completely suppressed the clicks.



    However, when applied to the entire episode it also distorted the start of a few sentences which began with single short syllables.







    88



    The agate filter has a number of parameters which could be adjusted to try to deal with these cases, although I did not spend the time to do so.







    Another solution to this distortion problem is to simply not apply the filter to those parts of the audio which are affected.



    If you record the audio as a series of small individual files, it would be easy enough to filter before concatenating the files together while skipping those files which contain audio which is not suited to this method.







    Here are the results of the experiments.







    89 FFMPEG afftdn



    This reduces the size of of the ticks, but they are still present.



    However, they may be reduced to a level which is considered acceptable.







    90 FFMPEG agate



    This was very effective in removing ticks with the right parameters.



    However, it can introduce some voice distortion in the form of cutting out the start of a few sentences which began with single short syllables.



    This can be corrected with a very short "attack" parameter to turn off the filter when it detects sound above a set threshhold.







    91 FFMPEG arnndn



    This was relatively ineffective.







    92 Sox noisered



    This was effective in removing the sounds between phrases.



    However, it introduces some distortion in the voice signal.







    93



    I also tried combining filters.







    FFMPEG afftdn Followed by agate



    This combined two different filters.



    First, it used afftdn to suppress the background noise to a lower level without much voice distortion.



    Then it applied the agate filter to suppress the noise levels between words still further.



    This got rid of virtually all of the background noise between words.







    94



    Here is a short audio sample from HPR4637.



    First is the unfiltered audio.



    Second is the filtered audio using the combined afftdn plus agate filters.



    Since the "clicks" are very quiet, you may not hear them unless you are in quiet environment.



    Quite a few listeners would probably not be aware of the perceived audio problem in this episode if it had not been discussed here.



    None the less, it makes for an interesting experiment.



    Here it is:







    95 (Insert sample audio here)











    96 Overall Conclusion for Noise "Ticks"



    The afftdn combined with agate filters seemed to offer the best overall results when used with the right parameters.



    However, the author, Vance, speaks very clearly and evenly, and so his voice is ideally suited for use with this filter.



    Another author's voice may not be as suited to this filter.







    97



    The Sox noisered profile based filter offers various degrees of trade off between suppressing noise and distorting the voice signal.



    As to whether this is an acceptable trade off depends on the particular voice in question and how easily understood it is under normal circumstances with out additional distortion.



    The afftdn filter may be a fairly safe filter to use on its own while producing acceptable if not perfect output.











    --------------------











    98 Overall Conclusions







    I have presented only a few of the experiments that I conducted.



    My overall conclusion after all of this is that there is no universal audio filtering method that works best in all circumstances.



    There are instead a number of tools in the toolbox, and picking the right one for the job takes a bit of trial and error.



    99



    However, if you have a repeatable recording environment, then once you have decided what tool you need you should create a script for it so you can have a repeatable processing setup.



    These conclusions apply to voice podcasting.



    Music has a different set of criteria and techniques that work well with basic voice podcasting may produce poor results when applied to music which has a broader range of frequency and just as importantly, a broad range of loudness.







    100



    If you are used to using filters and effects in Audacity, many of the settings on those correspond to arguments in the command line version of ffmpeg.



    It is worth learning how to use ffmpeg directly to automate your recording process.







    101



    The experiments that I conducted were greatly assisted by writing scripts which created multiple versions of audio files with different settings, thereby allowing me to try many different alternatives relatively easily.



    It also allowed me to concatenate different audio samples into a single audio file and so listen to different versions in quick succession, making subjective listening judgments more reliable.







    102



    It is important to keep in mind in all this that I am playing with audio filtering mainly to have fun.



    It is not necessary to do any of this if you think your podcast episode sounds just fine without it.



    So, don't let any of what I have talked about in all this discourage you from simply recording a podcast and sending it in as is.







    I will include copies of the filters I have described here in the show notes.











    --------------------







    103 Related Matters







    Hardware Characterization Using Audio Signals



    I found it useful to characterize the hardware that I had in order to understand its limitations better before starting the experiments.



    This involved playing a signal out through a set of speakers and then recording it through a microphone.







    104



    I used two types of signal for this.



    One is type of signal is known as a "chirp" signal.



    This is a sine wave that steadily increases in frequency as it sweeps across the audio spectrum.



    The standard audio range is 20 Hz to 20 kHz, but for my purposes I limited the upper frequency to 15 kHz to save time as anything beyond that is not very useful for voice podcasts.







    105



    By recording the chirp signal with a microphone and analyzing it with a Fourier transform, I could quickly see what each device was capable of.



    See my previous series on simple podcasting for an explanation of what a Fourier transform is and what software to use to see the results of it.







    Here is a chirp signal.







    106 (Insert Audio Sample Here)







    107



    In addition to a chirp signal, I also used a series of simple tones of specific frequencies.



    By using these tones of known frequency I could gain an understanding of the limitations of my speakers and headphones, and just as importantly, my own ears.



    By understanding these limitations I was able to narrow the range of frequencies that I need to deal with quite considerably and set the high and low pass filters accordingly.



    These tones are a series of flac files generated with ffmpeg.







    108



    Here is a a sample audio tone at a 2 kHz frequency.







    109 (Insert Audio Sample Here)







    110



    Copies of the script to create the chirp signal and the tones are in the show notes.







    --------------------











    111 A "Not a Review" of some of the Hardware that I Used







    I said that I would not do a review of the hardware that I used.



    However, some of it deserves mention for either how good or bad it was.



    I will record each section using the hardware being described.











    112 Maxwell Headset



    This is my original recording hardware.



    This is a headset with boom mic and USB connection.



    There is no model number on it, so I don't know the model.



    This probably cost somewhere between 10 and 25 dollars.



    The earpieces sit on the ears and do not fully enclose them.



    This makes it light weight and comfortable to wear for extended periods of time.



    It has a problem however with electronic noise consisting of a noise spike every 1 kHz.



    I was able to fix this with a series of filters using FFMPEG.



    Fixing this problem is what got me started in understanding audio.



    I will probably continue to use this headset to make podcasts.







    113 XTrike Headset, Model GH-510



    This is also a headset with boom mic and USB connection.



    I purchased this headset for the purposes of experimentation for this podcast episode.



    It cost $12.88.



    I found it to be surprisingly good for the price.



    It has fully enclosed ear pieces however, which may make it uncomfortable to wear in hot weather.



    I may try doing some of my future podcasting using this headset.







    114 Borne Earpiece and In-line Microphone



    This is a set of earplugs that go in your ears and connected by wires and a very small microphone built into a small bulge in the cable. It connects using a 3.5mm jack.



    The model number seems to be BUD250-BL.



    It cost approximately $3.00.



    I bought several sets of these and use them for listening to podcasts from an MP3 player.



    The ear pieces are pretty good for listening with.



    The microphone works reasonably well when used in a quiet location.



    It is less good when in a noisy environment.



    It is very important however to secure the microphone to your lapel or other location reasonably near your mouth and to point the microphone (that is the small hole) outwards and not simply let it dangle freely.



    If you let it just hang, you will get poor quality and inconsistent audio.







    115 Yanmai Condenser Microphone, Model SF-910



    I purchased this microphone for the purposes of experimentation for this podcast episode.



    It cost $3.88.



    As it is a condenser microphone, it is prone to picking up background noise more and as such is probably not a good choice for podcasting by single person sitting at a desk.



    However, it is none the less a surprisingly good microphone for surprisingly little money.







    116 iCan USB Microphone, Model M-306



    I purchased this microphone for the purposes of experimentation for this podcast episode.



    This has a USB connection.



    This was also relatively inexpensive at $7.99, or roughly twice the price of the Yanmai microphone.



    Unlike the Yanmai however, it is absolutely wretched.



    There was such a high degree of distortion when recording through it that I found I could not use it in the fan experiments which I had bought it for.



    I ended up buying the Yanmai microphone for that instead.







    --------------------







    117 Easy Effects Software



    The techniques described so far all involve recording audio files and then processing them later to produce the desired result.



    This is probably the simplest and most straightforward way of doing things if you are making a typical podcast.



    However, there may be instances where you want to apply filtering or other effects on the "live" signal immediately and not after the fact.







    118



    There is audio software which can hook into your computer's audio system and do this with a live signal.



    For Linux, there is a package called "Easy Effects".



    This is Free Software and comes under a GPL V3 or later license.



    I installed it from the Debian repository under Ubuntu 24.04.







    119



    You can create various filters and even chain them together to combine them.



    I played with it a bit but do not know enough about it to discuss it seriously at this time.



    However, I thought it would be worth mentioning for the sake of those who may wish to try it out themselves.











    --------------------











    120 Episode Conclusion







    After having had some fun with audio and listening to other HPR members talk about audio, I thought I would have some more fun by playing with noise reduction filters.



    I have no intention of becoming an audio professional, but by doing some experiments I learned a few things and had some fun doing it.







    I hope that the rest of you found this interest as well.







    I will see you all again later in another episode of Hacker Public Radio.







    --------------------







    Scripts







    Basic Filter



    This shows basic high and low pass filters ( 120 Hz and 8 kHz respectively)



    and band reject filters for 50 and 60 Hz.







    # The high and low pass filters.



    hlpfil="highpass=f=120, highpass=f=120, lowpass=f=8000, lowpass=f=8000"







    # Band reject filters filter for 60Hz and another for 50Hz.



    linefil="bandreject=f=60:width_type=h:w=20, bandreject=f=50:width_type=h:w=20"







    # Filter using ffmpeg.



    ffmpeg -i inputfile.flac -af "$hlpfil, $linefil" outputname.flac







    # ======================================================================







    afftdn Filter







    # noisefloor should be between 20 and 80.



    noisefloor=$1



    # Run the noise reduction.



    ffmpeg -i testrec-filtered.flac -af "afftdn=nr=10:nf=-""$noisefloor" tmptestrec.flac







    # ======================================================================







    agate Filter







    # threshold shoud be between 10 and 80.



    threshold=$1



    # Run the noise reduction.



    ffmpeg -i testrec-filtered.flac -af "agate=threshold=-"$threshold"dB:range=-60dB" tmptestrec.flac







    # ======================================================================







    arnndn Filter







    # mix should be between 0 and 1.



    mix=$1



    # Run the noise reduction.



    ffmpeg -i testrec-filtered.flac -af 'arnndn=model=std.rnnn:mix='"$mix" tmptestrec.flac







    # ======================================================================







    sox noisered Filter







    # Generate the noise profile from a sample of background noise.



    sox silencefiltered.flac -n noiseprof noise.prof







    # nramount shoudl be between 0 and 1



    sox testrec-filtered.flac noiseout-testrec.flac noisered noise.prof "$nramount"







    # ======================================================================







    Manual Filter for Maxwell Headset Noise











    # Create a series of band reject filters, from 1 kHz to 11 kHz.



    ftemplate="bandreject=f=%s000:width_type=h:w=100"



    kilospikefil=$( seq 1 11 | xargs printf "$ftemplate," )







    # Using ffmpeg



    ffmpeg -i testrec-filtered.flac -af "$kilospikefil" tmptestrec.flac







    # ======================================================================







    Create a "chirp" signal







    # Start frequency.



    f0=20



    # End frequency.



    f1=15000



    # Duration of signal.



    duration=10







    ffmpeg -f lavfi -i "aevalsrc=sin(2 * PI * (0.5 * ($f1 - $f0)/$duration * t^2 + ($f0 * t))):s=44100:d=$duration" -c:a flac -af "aformat=sample_fmts=s16" chirp.flac







    # ======================================================================







    Generate Audio Tones







    toneout () {







    printf -v freqval "%05d" $1



    ffmpeg -f lavfi -i "sine=frequency=$freqval:duration=3" tmptone.flac



    # Normalize



    ffmpeg -i tmptone.flac -af loudnorm=I=-17:TP=-2.0:LRA=4.0 -ar 44.1k -sample_fmt s16 tone$freqval.flac



    rm tmptone.flac



    }







    # List of frequencies in hertz.



    freqlist="50 60 100 120 130 140 150 160 170 200 500 1000 2000 3000 4000 5000 6000 7000 8000 9000"







    for freq in $( echo $freqlist ); do



    toneout $freq



    done







    # ======================================================================





    Provide feedback on this episode.
  • Hacker Public Radio

    HPR4657: UNIX Curio #8 - Comparing Files

    09.06.2026
    This show has been flagged as Clean by the host.

    This series is dedicated to exploring little-known—and occasionally useful—trinkets lurking in the dusty corners of UNIX-like operating systems.


    Most users of UNIX-like systems are probably familiar with the
    diff
    utility. It is widely used with source code to compare two files and see what the differences are between them. Non-programmers, like me, also use it to examine what has changed in different versions of scripts or configuration files. Quite a few pieces of newer software can compare different versions of data and express changes in a format either identical to or similar to
    diff
    output.



    However, there are two other long-standing tools for this purpose that are far less known and deserve in my view to be termed UNIX Curios. The first of these is


    cmp




    1
    . While
    diff
    is primarily intended to be used on text files and compares them line by line,
    cmp
    compares files byte by byte. In my experience, its main use is to see whether two binary files are in fact identical—if they are,
    cmp
    outputs nothing and returns an exit status of 0. Back when methods of transferring files were not as reliable as they are today, this was a tool I would reach for sometimes. For example, you could use it to confirm that the data on a CD-ROM you burned was the same as the original.



    If there is a difference between the files,
    cmp
    will return an exit status of 1. By default, it will also print the location (byte and line number) of the first differing byte. When used with the
    -l
    option, it will print the location and value of
    every
    byte that differs. There is one exception to these: if the files are the same except that one is shorter than the other, it will print a message to that effect. The exit status will still be 1 in that case.



    Using the
    -s
    option with
    cmp
    will cause it to be totally silent and output nothing. Only the exit status will indicate whether the files are the same, different, or if the exit status is greater than 1, that an error occurred. This makes it useful for scripting, for example in case you wanted to confirm that a file copied to another location arrived fully intact.



    It is worth noting that
    diff
    is also capable of comparing binary files—however, it is not required by POSIX to report what is actually different or where differences occur. The same exit status as in
    cmp
    is returned: 0 if the files are the same, 1 if they are different, or greater than 1 if an error occurred. While many implementations offer an option to suppress the output,
    this is not in the standard


    2
    so the most portable method would be to instead redirect output to
    /dev/null
    . On my system the
    diff
    utility is three times the size of
    cmp
    , so if you don't need its extra capabilities, it is a less efficient way of doing the job.



    The other UNIX Curio for today is


    comm




    , and this utility


    3
    is also intended to compare two files to see what is common between them. Ken Fallon briefly talked about it a few years ago in
    HPR episode 3889
    . Compared to the others, it has a much more specific use case. The two files are expected to be text files that are already sorted. What
    comm
    will do is print a tab-separated list of all the lines appearing in either or both files. Lines only in the first file will appear in the first column, lines only in the second file will be in the second column, and lines in both files will be in the third column.



    Any combination of the options
    -1
    ,
    -2
    , and
    -3
    can be used with
    comm
    to suppress printing of the first, second, or third column respectively. Using all three options at the same time
    is
    supported but it results in no output, so that isn't very useful. Unlike the other utilities, the exit status of
    comm
    doesn't tell you anything about the two files. It will be 0 if the program ran successfully, and greater than 0 if it didn't.



    I'm not sure if I have ever actually used
    comm
    for anything practical. I find its default output a bit difficult to meaningfully interpret, plus you need to ensure the two files are already sorted. It seems to be best suited to comparing lists, and one use case that Ken Fallon mentioned would be comparing two lists of files to see if any are missing. The command
    comm -3 listA listB
    would print files that only appear in
    listA
    in the first column and those only in
    listB
    in the second column. This would let you ignore all the filenames that appear in both and focus on those that were absent from one or the other. If on the other hand you only wanted to see the filenames that
    are
    on both lists,
    comm -12 listA listB
    would give you that.



    Some more frivolous potential uses also come to mind. If for some reason the
    cat
    utility is broken on your system, you could use
    comm listA /dev/null
    to print the file
    listA
    instead. If you want to insert tab characters before every line of a file but have an aversion to using
    sed
    or
    awk
    , then
    comm /dev/null listA
    would output
    listA
    with one tab before each line, and
    comm listA listA
    would insert two tabs. A bit silly, but it would work. The GNU implementation of
    comm
    even lets you
    choose something other than a tab to separate the columns


    4
    , so you could go wild with that.



    According to the POSIX specifications for
    cmp
    and
    comm
    , one of the two filenames given as arguments, but not both, can be a "
    -
    ", in which case standard input will be used for that "file" in the comparison. Also, the results are undefined if both arguments are the same FIFO special, character special, or block special file. Some implementations might not have these limitations, but you shouldn't rely on that everywhere.



    All three of these were developed quite early. The


    cmp




    utility
    appeared in 1971's First Edition UNIX
    5
    , while


    comm


    and


    diff


    seem to have made their debut in Fourth Edition UNIX
    6,7
    from 1973. The original versions might not have behaved exactly like their modern counterparts, and newer implementations (especially of the
    diff
    utility) have acquired additional options and capabilities, but the basic operation of each has stayed the same.



    The next time you need to compare files against each other, consider whether
    cmp
    or
    comm
    might be appropriate before automatically reaching for
    diff
    . They all have their uses in different situations.



    References:







    Cmp specification
    https://pubs.opengroup.org/onlinepubs/009695399/utilities/cmp.html





    Diff specification
    https://pubs.opengroup.org/onlinepubs/009695399/utilities/diff.html





    Comm specification
    https://pubs.opengroup.org/onlinepubs/009695399/utilities/comm.html





    GNU coreutils manual: comm
    https://www.gnu.org/software/coreutils/manual/html_node/comm-invocation.html





    First Edition UNIX cmp manual page
    http://man.cat-v.org/unix-1st/1/cmp





    Fourth Edition UNIX comm manual page
    https://www.tuhs.org/cgi-bin/utree.pl?file=V4/usr/man/man1/comm.1





    Fourth Edition UNIX diff source
    https://www.tuhs.org/cgi-bin/utree.pl?file=V4/usr/source/s1/diff1.c







    Provide feedback on this episode.
  • Hacker Public Radio

    HPR4656: My review of musicozy sleep/exercise bluetooth headband

    08.06.2026
    This show has been flagged as Clean by the host.


    Sound quality, ease of use, comfort, battery life, price



    https://themusicozy.com/products/headband/index.html
    Provide feedback on this episode.
  • Hacker Public Radio

    HPR4655: Tips for Glasses

    05.06.2026
    This show has been flagged as Clean by the host.

    HPR and Glasses





    HPR community members are nerds



    We know from movies that nerds wear glasses



    We can conclude that HPR community members wear glasses





    Cleaning Background





    I have very oily skin and am constantly smudging my glasses



    All lenses wipes are too small.



    I accidentally touch the lenses with my fingers when I am trying to clean them And smudge them up again



    I heard an eye doctor say, the best way to clean glasses is with dish soap and dry with a microfiber cloth



    I tried this method It is a great solution because you wash glasses and fingers tips at the same time





    Cleaning Method





    Hand soap is OK to use on glasses.



    get the soap on you fingertips



    Then hold your glasses one of the lenses



    Use your thumb and finger tips to clean the glasses



    the soap removes the excess oil from your fingertips



    no smudges when you dry with the microfiber cloth





    Progressives





    With regular progressives the top of the lenses is for distance vision and the bottom of the lenses is for up close vision



    There is a zone in the middle for medium distance, but it is very narrow



    Using a computer at work I kept having to move my head up and down to find the best position for working.



    Computer Glasses have more space for intermediate distances



    From
    https://iotlenses.com/blog/eight-types-of-progressive-lenses.html






    Computer progressive lenses, also known as occupational designs or enhanced readers, are optimized for intermediate and near vision, making them ideal for tasks like prolonged computer work or activities at mid-range distance




    Provide feedback on this episode.
  • Hacker Public Radio

    HPR4654: What's in my component Box?

    04.06.2026
    This show has been flagged as Explicit by the host.

    Background



    This episode describes the contents of an old fishing tackle box I got as a birthday present very many years ago. I used it over the years to gather a pile of mostly useless electronic components and junk.



    I came across it recently when we were doing a clear out. Mrs X wanted to throw it out. I had a lot of sentimental value due to the long time I’ve had it. I am a bit of a hoarder and it took a bit of persuasion on my part to be able to keep it especially since I could not think of a single use for any of the contents!







    I’ve not had time to add links against all the items. Hopefully I’ve managed to add links to most of the more unusual items. Apologies if I’ve missed any.









    Contents of Box













    Top row left to right, back to front







    Compartment 1





    Stereo Jack plug & socket




    Double pole double throw (2-way) switch





    12V dc relay from RS




    3 legged semiconductor (voltage regulator?)







    Compartment 2



    Multiple fuses mostly for cars







    Compartment 3



    Small silica jelly pouch





    Micro Switch






    Reed switches (Not reed relays as I call them in my show)








    Compartment 4



    Potentiometers, Rheostat, variable resistors
    https://en.wikipedia.org/wiki/Potentiometer




    Control knobs







    Compartment 5



    Large selection of miniature panel mounted toggle switches
    https://en.wikipedia.org/wiki/Switch#Toggle_switch








    Compartment 6



    Two crocodile clips
    https://en.wikipedia.org/wiki/Crocodile_clip




    Half of a Hi Fi speaker plug
    https://en.wikipedia.org/wiki/File:Speaker_din_male_and_female.jpg




    Washer







    Compartment 7



    Mostly chocolate block connectors
    https://en.wikipedia.org/wiki/File:Leuchterklemme_75dpi.jpg




    Small selection of glass cartridge Fuses



    Single 13 Amp mains fuse for UK plug



    Assortment of soldering iron tips



    Crocodile clip



    Air adapter for foot pump for blowing up an air bed or similar



    Spare nozzle for a de-soldering tool. Made from PTFE
    https://en.wikipedia.org/wiki/Desoldering#/media/File:Vacuum_plunge.jpg






    https://en.wikipedia.org/wiki/Polytetrafluoroethylene




    Ferrite ring
    https://en.wikipedia.org/wiki/Ferrite_bead








    Compartment 8



    Rubber Grommets and a heatsink











    Middle row left to right, back to front







    Compartment 1



    Large selection of glass cartridge fuses







    Compartment 2



    Another large selection of glass cartridge fuses



    Small selection of diodes, some quite Large
    https://en.wikipedia.org/wiki/Diode








    Compartment 3



    Two multi turn precision variable resistors
    https://en.wikipedia.org/wiki/Potentiometer#/media/File:Beckman_Helipot_potentiometer_SA1400A_2007.075.002.jpg




    Cheap variable resistor with in built switch







    Compartment 4



    Bag of multi coloured LED’s (Cheap for Pi add on board)



    2 inch 8 ohm speaker







    Compartment 5



    Panel mounted heavy duty toggle switch, two pole one way







    Compartment 6



    Light Dependent Resistor (LDR)
    https://en.wikipedia.org/wiki/Photoresistor




    Large Tricolour LED







    Compartment 7



    Variable capacitors PCB (Printed Circuit board) mounted



    Spare nozzle for de-soldering tool. Made from PTFE



    Light Dependent Resistor (LDR)



    Panel mounted heavy duty rotary switch, two pole one way



    Bag of various fuses



    Halogen 12V car headlight bulb



    Variable resistor with long plastic spindle, panel mount



    Heatsink possibly for heavy duty transistor







    Compartment 8



    Variable resistor PCB (Printed circuit board) mounted











    Bottom row



    This is just a big jumble of stuff, listed in no particular order



    DC red and black power lead with inbuilt fuse



    Small solder-less breadboard for prototyping





    https://en.wikipedia.org/wiki/Breadboard




    Bag of various plugs & connectors mostly Jack plugs and sockets



    Bag of quartz crystals and a components receipt from 1985 I added crystals to an old PMR (Private mobile radio) boot mount radio. Possible a Pye Westminster Radio. I looked but couldn’t find picture of the radio



    Several bits of Perfboard or strip board





    https://en.wikipedia.org/wiki/Perfboard




    1 Watt audio amplifier kit with instructions not built!



    D-type serial port mounted to PCB with screw down connections



    Bag of resistors
    https://en.wikipedia.org/wiki/Resistor




    Large bag of LED panel mount holders



    Electronic Instruction guide XH79L (Maplin) price 25p



    Chocolate block connecting block
    https://en.wikipedia.org/wiki/File:Leuchterklemme_75dpi.jpg




    Telephone pickup for recording phone calls. (Never worked)
    https://www.amazon.co.uk/Black-Telephone-Pickup-Sensitive-Microphone/dp/B000L1OZG8




    Multi coloured ribbon cable



    Plastic trimming tool screwdriver set.
    https://www.amazon.co.uk/C-K-T4857-Precision-Plastic-Trimmer/dp/B000WKIYTW




    Panel mounted BNC socket (Baby Neill Constant)





    https://en.wikipedia.org/wiki/BNC_connector








    Provide feedback on this episode.
Flere Nyheder podcasts
Om Hacker Public Radio
Hacker Public Radio is an podcast that releases shows every weekday Monday through Friday. Our shows are produced by the community (you) and can be on any topic that are of interest to hackers and hobbyists.
Podcast-websted

Lyt til Hacker Public Radio, #dkpol og mange andre podcasts fra hele verden med radio.dk-appen

Hent den gratis radio.dk-app

  • Bogmærke stationer og podcasts
  • Stream via Wi-Fi eller Bluetooth
  • Understøtter Carplay & Android Auto
  • Mange andre app-funktioner