Re: [freesound-api] Combined Search and Distance to Target

43 views
Skip to first unread message
Message has been deleted

Arthur Agapoff

unread,
Apr 24, 2019, 2:19:06 AM4/24/19
to freeso...@googlegroups.com
Hi Paulo,

Is it me or you just showed everyone your private API key?

Have a nice day.

Le mar. 23 avr. 2019 à 23:46, Paulo Teixeira <paulo.ftei...@gmail.com> a écrit :
Hi Frederic, 

First of all, thank you for all your efforts in answering previous posts. It already helped in a few situations. However, I am having weird behaviour from the API and I can't figure out why.
I am requesting in order to achieve specific sounds, making a combined search with tags and content description.

For exemple:

Even though I'm asking for 150 sounds, I am getting only 13 with a distance to target of 2.073709 +/- . So far, ok.

When I try to make a similar request, incrementing only the number of descriptors.
https://freesound.org/apiv2/search/combined/?token=LpBfigJHMd95Y6oIuq1ghTFlYtkS7licG8BTIIiH&filter=tag:car&target=lowlevel.spectral_flux.mean:1.182%20AND%20lowlevel.spectral_rms.mean:0.0038%20AND%20lowlevel.spectral_energy.mean:0.0038%20AND%20lowlevel.spectral_kurtosis.mean:8.1172%20AND%20lowlevel.spectral_skewness.mean:2.365%20AND%20lowlevel.spectral_energyband_low.mean:0.5208%20AND%20lowlevel.spectral_flatness_db.mean:0.2456%20AND%20lowlevel.spectral_spread.mean:4898.7392%20AND%20lowlevel.zerocrossingrate.mean:977.8166%20AND%20lowlevel.spectral_centroid.mean:2948.0918%20AND%20lowlevel.spectral_decrease.mean:2.3232%20AND%20lowlevel.spectral_rolloff.mean:5355.3998%20AND%20sfx.inharmonicity.mean:0.439%20AND%20lowlevel.pitch.mean:394.0348%20AND%20lowlevel.spectral_entropy.mean:0.6762&page_size=150&fields=name,tags,previews

I am getting almost 38 sounds (requesting 150) but with a huge difference on the distance to target, rising to 12098924.0 .
My question is why I can't get the 150 samples in the first search(only 13) if distance can go up to numbers much higher than 2.073709. It's also weird if I start to filter by duration, I get one or two samples.

Thank you for your time, 
Paulo Teixeira



--

---
You received this message because you are subscribed to the Google Groups "Freesound API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to freesound-ap...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Paulo Teixeira

unread,
Apr 24, 2019, 4:24:51 AM4/24/19
to Freesound API
Hi Frederic, 

First of all, thank you for all your efforts in answering previous posts. It already helped in a few situations. However, I am having weird behaviour from the API and I can't figure out why.
I am requesting in order to achieve specific sounds, making a combined search with tags and content description.

For exemple:
https://freesound.org/apiv2/search/combined/?&filter=tag:car&target=lowlevel.spectral_flux.mean:1.182%20AND%20lowlevel.spectral_rms.mean:0.0038%20AND%20lowlevel.spectral_energy.mean:0.0038%20AND%20lowlevel.spectral_kurtosis.mean:8.1172%20AND%20lowlevel.spectral_skewness.mean:2.365%20AND%20lowlevel.spectral_energyband_low.mean:0.5208%20AND%20lowlevel.spectral_flatness_db.mean:0.2456%20AND%20lowlevel.spectral_spread.mean:4898.7392&page_size=150&fields=name,tags,previews

Even though I'm asking for 150 sounds, I am getting only 13 with a distance to target of 2.073709 +/- . So far, ok.

When I try to make a similar request, incrementing only the number of descriptors.
https://freesound.org/apiv2/search/combined/?&filter=tag:car&target=lowlevel.spectral_flux.mean:1.182%20AND%20lowlevel.spectral_rms.mean:0.0038%20AND%20lowlevel.spectral_energy.mean:0.0038%20AND%20lowlevel.spectral_kurtosis.mean:8.1172%20AND%20lowlevel.spectral_skewness.mean:2.365%20AND%20lowlevel.spectral_energyband_low.mean:0.5208%20AND%20lowlevel.spectral_flatness_db.mean:0.2456%20AND%20lowlevel.spectral_spread.mean:4898.7392%20AND%20lowlevel.zerocrossingrate.mean:977.8166%20AND%20lowlevel.spectral_centroid.mean:2948.0918%20AND%20lowlevel.spectral_decrease.mean:2.3232%20AND%20lowlevel.spectral_rolloff.mean:5355.3998%20AND%20sfx.inharmonicity.mean:0.439%20AND%20lowlevel.pitch.mean:394.0348%20AND%20lowlevel.spectral_entropy.mean:0.6762&page_size=150&fields=name,tags,previews

Frederic Font Corbera

unread,
Apr 24, 2019, 4:57:59 AM4/24/19
to freeso...@googlegroups.com
Hi Paulo,

Regarding the api key made public, you can create a new one and I'll delete the one published in the last post. let me know when you're using a new one so I delete the old.

Combined search is a bit tricky because it gets results from different search indexes and combines them, and it does not guarantee the number of results to be the one you asked for. The distance is calculated taking into account normalized values of the descriptors you add in the query. If your query corresponds to an "unusual" point in the descriptors space, it could happen that distance grows very quickly. Also regarding the number of results it can also happen that if you follow the "more" link, you get extra results (in fact, I see that happening at least for the first query you posted). Check the full documentation about the response to combined search queries which I hope it will help: https://freesound.org/docs/api/resources_apiv2.html#combined-search

Cheers,


frederic

---
Frederic Font
Music Technology Group
Universitat Pompeu Fabra

Freesound | www.freesound.org
Audio Commons | www.audiocommons.org



--
Reply all
Reply to author
Forward
0 new messages