105 karma · joined January 25, 2021
Some programs imprudently rely on code such as the following
sprintf(buf, "%s some further text", buf);
to append text to buf. However, the standards explicitly note that the results
are undefined if source and destination buffers overlap when calling sprintf(),
snprintf(), vsprintf(), and vsnprintf(). Depend‐ ing on the version of gcc(1)
used, and the compiler options employed, calls such as the above will not
produce the expected results.The glibc implementation of the functions snprintf() and vsnprintf() conforms to the C99 standard, that is, behaves as described above, since glibc 2.1. Until glibc 2.0.6, they would return -1 when the output was truncated.
- printf(3), Linux man-pages 6.04, 2023-04-01
I've not benchmarked XML parsing times in a very long time, I'd be interested in seeing the numbers now.
Tabular data is barely data, honestly, hence my PS, I don't think spreadsheets in general are a very good way to store anything.
And yes, absolutely, overengineering is bound to happen, which is unfortunate, but I'm not sure if it really can be avoided while still keeping many of those upsides (especially the rigorous definitions)
<bankstatement>
<transaction date="2021-08-19" description="Hello, world!">
<debit commodity="USD">100</debit>
<balance commodity="USD">237.87</debit>
</transaction>
</bankstatement>It is self describing, rigorously defined for the machine, highly flexible, highly extensible, human readable, text-based and an open format, and it is only mentioned as a storage format in the post, not even nearly doing it justice!
XML is complex, but there's already very established libraries for handling it, so that shouldn't be an issue, and that's the only drawback XML has.
Hell, even alternatives like JSON/YAML + JSONSchema exist, still providing incredibly rigorous validation, but staying human readable and ubiquitous.
P.S. I think a bigger failure here is trying to generalize the concept of spreadsheets, rather than using a common encoding (XML) for domain-specific data formatting.
pcm.!default {
type asym
playback.pcm "cards.pcm.default"
capture.pcm "rnnoise"
}
As for the second thing, you could do what I do and use pcm_jack, like this: pcm.!default {
type asym
playback.pcm "plug:jack"
capture.pcm "plug:rnnjack"
}
pcm.rnnjack {
type rnnoise
slave.pcm plug:jack
}
Keep in mind this will need more setup, specifically to set JACK up, and is definitely overkill, but may be fun. Also, this config is how my setup works exactly. 16:57 <ArsenArsen> where and under what license is the training data used for RNNoise?
18:38 <rillian> ArsenArsen: There's a copy of what I believe is the training data on the xiph server, but afaik it's never been published
18:39 <rillian> the original submission page has an EULA waiving copyright and liability claims, and agreeing that it _may_ be released CC0.
18:40 <rillian> it looks like that didn't actually happen.
18:41 <rillian> there may have been concerns about auditing it for privacy issues, but there's a lot of audio to listen to, 6.5G compressed
18:41 <rillian> jmspeex, TD-Linux: what's the status of publishing the rnnoise training data?
18:43 <jmspeex> Are you talking about the data that was used to train the default RNNoise model or the noise that got collected with the demo?
18:43 <rillian> jmspeex: I think debian just cares about the training data for the default model.
18:44 <jmspeex> There was never plan to release that -- it includes data from databases we cannot release
18:44 <jmspeex> but I don't see what the issue is. Distributing the model is not the same as distributing the data
18:45 <rillian> ah, I see. I didn't realize you'd used proprietary sources as well.As for packaging, that's my field of work for some projects I'm working on so it's not unfamiliar to me, the only problem is that the RNNoise upstream lacks releases, although there's discussion about something happening about that.
I'll look into expansion and compression, and I could implement a wet/dry setting that multiplies the source samples and then mixes them into the result, if I understood the concept right.
EDIT: RNNoise seems to be alright when it comes to canceling noise during speech too, I didn't notice it overdoing it.
I don't feel I'm qualified to elaborate on this specifically, again, I'm no ML person. For more info look here: https://github.com/xiph/rnnoise/tree/master/training https://github.com/xiph/rnnoise/blob/master/TRAINING-README
EDIT: Do note, though, that each process pulling audio will be denoising independently, so the usage scales linearly with the amount of clients. This is due to how ALSA plugins work, but regardless of that, on a Ryzen 5 1600x (the only CPU I can test on), the plugin uses 2.5% of a single core when recording mono 48k
alsa_rnnoise is a very simple ALSA filter plugin that runs its input through rnnoise before outputting it back to ALSA. It operates in real time, adds very little latency (the amount depends on what size frames ALSA delivers, but is nominally less than 10ms). After enabling it, any annoying background sounds were gone. My intended use cases for this were VoIP, screencasting and streaming, and, as far as I can tell, it works great for all three.
alsa_rnnoise is a very simple ALSA filter plugin that runs its input through rnnoise before outputting it back to ALSA. It operates in real time, adds very little latency (the amount depends on what size frames ALSA delivers, but is nominally less than 10ms). After enabling it, any annoying background sounds were gone. My intended use cases for this were VoIP, screencasting and streaming, and, as far as I can tell, it works great for all three.