Ну, гостевая среда KVM полностью изолируется от гостя, и кроме некоторой последовательной передачи не совсем возможно говорить с хостом, как являющимся функцией. Вы уже нашли что часть об установке канала передачи.
Я предложил бы использовать предварительно отобранную конфигурацию и пойти с одним из этих подходов.
Заставьте его выключиться после установки. Поместите это в файл перед семенем:
d-i cdrom-detect/eject boolean true
d-i finish-install/reboot_in_progress note
d-i debian-installer/exit/poweroff boolean true
После установки машина будет выключена автоматически. Таким образом, легко иметь некоторый признак относительно того, закончилась ли установка, но не слишком ясно на том, насколько успешный это было. Однако можно проверить, был ли CD извлечен (разъединенный) и имеет, по крайней мере, общее представление, которым это было.
Имейте его, выполняет команду после установки, также с помощью предварительного отбора:
d-i preseed/late_command string some_command_available_in_installer
или
d-i preseed/late_command string echo "FINISHED" > /dev/ttyS4
(измените целевое устройство) с Файлом журнала Устройства на хосте.
Взгляните на sox
цитирую man sox
:
SoX - Sound eXchange, the Swiss Army knife of audio manipulation
[...]
SoX is a command-line audio processing tool, particularly suited to
making quick, simple edits and to batch processing. If you need an
interactive, graphical audio editor, use audacity(1).
Итак, это должно быть неплохо подойти в качестве компаньонской командной строки, альтернативной Audaciy!
Относительно фактической задачи очистки записей взгляните на фильтр noisered
, для которого равен фильтр шумоподавления Audacity:
man sox | меньше -p 'noisered \["
[...]
noisered [profile-file [amount]]
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. noiseprof will write out a noise pro‐
file to profile-file, or to stdout if no profile-file or if
`-' is given. E.g.
sox speech.wav -n trim 0 1.5 noiseprof speech.noise-profil
To actually remove the noise, run SoX again, this time with
the noisered effect; noisered will reduce noise according to
a noise profile (which was generated by noiseprof), from
profile-file, or from stdin if no profile-file or if `-' is
given. E.g.
sox speech.wav cleaned.wav noisered speech.noise-profile 0
How much noise should be removed is specified by amount-a
number between 0 and 1 with a default of 0.5. Higher num‐
bers will remove more noise but present a greater likelihood
of removing wanted components of the audio signal. Before
replacing an original recording with a noise-reduced ver‐
sion, experiment with different amount values to find the
optimal one for your audio; use headphones to check that you
are happy with the results, paying particular attention to
quieter sections of the audio.
On most systems, the two stages - profiling and reduction -
can be combined using a pipe, e.g.
sox noisy.wav -n trim 0 1 noiseprof | play noisy.wav noise
[...]
La respuesta aceptada no da un ejemplo práctico (vea el primer comentario )así que estoy tratando de dar uno aquí. En Ubuntu con apt, debe instalar sox
y compatibilidad con formatos de audio
sox
Primera instalaciónsox
y soporte para formatos (incluyendo mp3):
sudo apt install sox libsox-fmt-*
Luego, antes de ejecutar su comando en el archivo/archivos, primero debe crear un perfil, hacer una muestra de ruido, esta es la parte más importante que tiene que seleccionar el mejor momento en que se produce el ruido, asegúrese de no tiene voz (o la música/señal que intenta mantener )en esta muestra:
ffmpeg -i source.mp3 -ss 00:00:18 -t 00:00:20 noisesample.wav
Ahora haga un perfil de esa fuente:
sox noisesample.wav -n noiseprof noise_profile_file
Y finalmente ejecute la reducción de ruido en el archivo:
sox source.mp3 output.mp3 noisered noise_profile_file 0.31
Donde noise_profile_file
es el perfil y 0.30
es el valor. Los valores van mejor entre 0,20 y 0,30, por encima de 0,3 es muy agresivo, por debajo de 0,20 es un poco suave y funciona bien para audios muy ruidosos.
Pruebe y juegue con eso y si encuentra otros trucos de configuración, comente con los hallazgos y la configuración de ajuste.
Si el ruido es similar, puede usar el mismo perfil para todos los archivos mp3
ls -r -1 *.mp3 | xargs -L1 -I{} sox {} {}_noise_reduced.mp3 noisered noise_profile_file 0.31
o si hay una estructura de carpetas:
tree -fai. | grep -P ".mp3$" | xargs -L1 -I{} sox {} {}_noise_reduced.mp3 noisered noise_profile_file 0.31