What technique (ultrasound/infrared) should I use to detect seeds inside a fruit?
You cannot realistically change the &quot;frequency&quot; of the infrared emitted from an infrared LED.
The  wavelength is more or less a fixed range determined by the semiconductor material of the LED.
The current through the LED will probably have some (slight) influence on the the center of the range, but not enough to do anything useful.  You will not vary the frequency from 300GHz to 430THz.
Think of colored LEDs.  The color is determined by the semiconductor material that forms the diode junction in the light emitting diode.  You can't &quot;tune&quot; a blue LED into a red one.
In the same way, you can't change what range of infrared wavelengths an infrared LED emits.  There are infrared LEDs available that have their peak sensitivity at different wavelengths, but the differences aren't as drastic as what you seem to want.
Infrared detector diodes have similar restrictions, though not as bad as the emitter.
Infrared detectors are also often sensitive to visible light as well as infrared.  You still won't get the range of wavelengths you want out of an infrared detector diode, though.

Most of the things you could use for distance detection have similar restrictions.
Ultrasound is often used to detect the distance between two objects.  The emitter and detectors are usually piezoelectric crystals, though, that operate over a fairly narrow frequency range.  That's the same problem you have with infrared.
Radar is another method used to detect distances.  Any typical implementation will also use a particular frequency or (relatively narrow) frequency range.
Maybe you should explain what you are trying to do.  There might be a common way to do it that other folks use all the time.

Now that you've explained what you are really trying to do, it seems that what need to do is something like &quot;egg candling.&quot;
You are trying to tell if seeds are growing inside a pod.
The simplest way I can think of to do that is to just look &quot;through&quot; the pod with a bright light.  Either by eye, or use a camera to record progress as the seeds grow.
Just hold your pod to a (very) bright light, and look through the pod for shadows.
It looks like this for an egg:

Borrowed from the linked page  on egg candling.