We formed p-GaAs/n-Si and n-GaAs/p-Si heterostructures by depositing thin-film GaAs on Si wafers with pulsed-laser deposition (PLD). For the GaAs ablation, the 532 nm emission of a Nd:YAG laser (10 Hz, 6 ns) with a fluence of 0.79-0.84 J/cm2 was used. The thicknesses of the films were approximately 0.5 μm. During the deposition, the substrate was not heated and the ambient pressure was kept at 10-6 torr. X-ray analysis showed that the films contain crystallites and by means of an atomic force microscope (AFM), it is demonstrated that the film surfaces are fairly smooth. Using a monochromatic light source and by means of electrical contacts on the top and the rear of the sample, we measured the photocurrent through the junction using lock-in technique. These measurements showed that the photocurrent spectra of the p-GaAs/n-Si diode crucially depend on the applied bias. At -0.7 V (reverse bias) the photocurrent maximum is at 930 nm, while at +0.5 V, the photocurrent maximum lies at 1056 nm. These maxima are in the vicinity to the bandgap of GaAs and Si, respectively. In other words, it is possible to switch between the spectral sensitivity of GaAs and Si via an applied electric field. The device can be either used as a photo-detector for which the sensitive wavelength range can be easily chosen by the applied bias or as hybrid multiplexer to convert two optical inputs into one electrical output.