LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   howto play wav files in debian wheezy? (https://www.linuxquestions.org/questions/linux-newbie-8/howto-play-wav-files-in-debian-wheezy-4175546750/)

jamison20000e 07-02-2015 12:14 PM

Audacity comes to mind or better yet:
Code:

sudo apt-get install vorbis-tools
then:
Code:

oggenc -h
and:
Code:

oggenc -q 3 -o NoName.ogg NoName.wav
too-many options to list,,, like many file-managers (e.g. Dolphin) have plug-ins to right-click and convert... ;)

floppy_stuttgart 07-02-2015 01:04 PM

Quote:

oggenc -q 3 -o file.ogg filewav.wav
gives..
Quote:

ERROR: Wav file is unsupported type (must be standard PCM
or type 3 floating point PCM
ERROR: Input file "filewav.wav" is not a supported format
For reading the file in windows7 with the media player, I had to download the codec as indicated before from the philips pages http://www.dictation.philips.com/adpcmcodec (ZIP file), open the ZIP, install with the exe, and now I can listen the wav file in windows7/media player.
Debian7 is still reluctant..

ondoho 07-03-2015 03:08 AM

Quote:

Originally Posted by floppy_stuttgart (Post 5386189)
I started synaptic and it updated a lot of files.

so you're not keeping your system up-to-date, hm?
Quote:

Same issues.
have you rebooted?


Quote:

Angehngt ist eine Sprachaufnahme des Philips Diktiergerts fr Smartphones.
Aufnahmebezeichnung: Ohne Name4.wav
Datum: 29.06.2015 21:03
Gre: 510.5 Kb
Audio-Codec:
Bei einigen Media Playern ist der WAV-Codec nicht vorinstalliert. Sie knnen den Codec von unserer Website herunterladen:
http://www.dictation.philips.com/adpcmcodec
some weird non-standard codec?
searching the web for "linux wav adpcm codec" gives many relevant-looking results, but nothing conclusive on first glance.
maybe the app can be told to use a different codec?

try different media players and install all optional dependencies, too (aka install-recommends).

floppy_stuttgart 07-03-2015 12:35 PM

Thanks for the answer. I contacted philips for help. Lets see if they answer.
The PC is updated and rebooted.
My thoughts are (according a previous post): translating the file in a new format (using sox ffmpeg or others).
File info with the command
Quote:

file OhneName4.wav
OhneName4.wav: RIFF (little-endian) data, WAVE audio, mono 16000 Hz

But this is going to be very specific task behind my knowledge.. lets further dig.. slowly.. carefully.. any advise is welcome.

Update: I start audacity and try to import the raw data with diverse parameter. I don't know what parameter to use so far in order to have the correct sound output.
Here is the app creating the wav file https://www.dictation.philips.com/ro...eries/support/

Shadow_7 07-05-2015 06:41 PM

Quote:

Originally Posted by floppy_stuttgart (Post 5386785)
OhneName4.wav: RIFF (little-endian) data, WAVE audio, mono 16000 Hz

aplay -t wav -f S16_LE -c 1 -r 16000 OhneName4.wav

See if that plays. If it does you can convert the file with sox to more common formats supported by most players.

Change the .wav to .riff and see if the usual players recognize it.

You might also try to use avplay or ffplay on the file.

floppy_stuttgart 07-06-2015 01:47 AM

Quote:

aplay -t wav -f S16_LE -c 1 -r 16000 file.wav
error..
aplay: test_wavefile:898: kann WAVE-Datei-Format 0x7259 nicht abspielen; ist weder PCM noch FLOAT

I could load the raw data in audacity. But I dont know how to make the parameter setup in order to listen to it (sound comes out but this is not understable).

Shadow_7 07-06-2015 01:42 PM

Riff seems to be a container format. Perhaps a .aiff file extension would work. The .iff is supposed to be the same, but big-endian, not little-endian bit ordering. That must be an oldy for sure.

How about:

$ sox -t raw -f S32_LE -c 1 -r 16000 file.wav -c2 -r 48000 -t wav convert.wav
$ play convert.wav

+/- a few options. There's likely some meta data in there which will be noise, but if the sound is PCM-ish format it should convert. And you can trim off the noise in audacity. A sample clip would go a long way in making something useful if that doesn't work.

ondoho 07-08-2015 04:19 AM

Quote:

Originally Posted by ondoho (Post 5386548)
maybe the app can be told to use a different codec?

have you tried this?

what operating system is the phone?
certainly there are other (better) apps available to record sound?

floppy_stuttgart 07-08-2015 02:32 PM

Quote:

Originally Posted by Shadow_7 (Post 5388002)
$ sox -t raw -f S32_LE -c 1 -r 16000 file.wav -c2 -r 48000 -t wav convert.wav
$ play convert.wav

Code:

sox -t raw -f S32_LE -c 1 -r 16000 filewav.wav -c2 -r 48000 -t wav convert.wav
sox WARN sox: Option `-f' is deprecated, use `-e floating-point' instead.
sox FAIL formats: can't open input file `filewav.wav': Unknown WAV file encoding (type 7259)

floppy_stuttgart 07-08-2015 02:35 PM

Quote:

Originally Posted by ondoho (Post 5388719)
have you tried this?

what operating system is the phone?
certainly there are other (better) apps available to record sound?

Windows7 + codecs from philips works.
Phone: blackberry Q10 (specific OS; non android)
Another app "Perrot" works on that blackberry Q10 phone. Perhaps I will have to stay with "Perrot" if the "Philips dictation app for blackberry Q10" dont make a WAV file understood by common linux programms (aplay, audacity etc.).

Shadow_7 07-08-2015 07:14 PM

sox -t raw -f S32_LE -c 1 -r 16000 filewav.wav -c2 -r 48000 -t wav convert.wav

Yeah, I forgot about that change.

Code:

sox -v 0.5 -t raw -e signed -b 32 --endian little \
          -c 1 -r 16000 filewav.wav \
          -t wav -c 2 -r 48000 convert.wav


floppy_stuttgart 07-25-2015 03:11 AM

Quote:

Originally Posted by Shadow_7 (Post 5389022)
Code:

sox -v 0.5 -t raw -e signed -b 32 --endian little \
          -c 1 -r 16000 filewav.wav \
          -t wav -c 2 -r 48000 convert.wav


That command works without error. the convert.wav file is there.
A "aplay convert.wav" command dont give an audible sound. I will check here what parameter I should use in order to have something audible (in audacity, with aplay or others).

Code:

avprobe convert.wav
ffprobe version 1.0.10 Copyright (c) 2007-2014 the FFmpeg developers
built on Jul 25 2014 07:50:40 with gcc 4.7 (Debian 4.7.2-5)
configuration: --prefix=/usr --extra-cflags='-g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security ' --extra-ldflags='-Wl,-z,relro' --cc='ccache cc' --enable-shared --enable-libmp3lame --enable-gpl --enable-nonfree --enable-libvorbis --enable-pthreads --enable-libfaac --enable-libxvid --enable-postproc --enable-x11grab --enable-libgsm --enable-libtheora --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libx264 --enable-libspeex --enable-nonfree --disable-stripping --enable-libvpx --enable-libschroedinger --disable-encoder=libschroedinger --enable-version3 --enable-libopenjpeg --enable-librtmp --enable-avfilter --enable-libfreetype --enable-libvo-aacenc --disable-decoder=amrnb --enable-libvo-amrwbenc --enable-libaacplus --libdir=/usr/lib/x86_64-linux-gnu --disable-vda --enable-libbluray --enable-libcdio --enable-gnutls --enable-frei0r --enable-openssl --enable-libass --enable-libopus --enable-fontconfig --enable-libfdk-aac --enable-libdc1394 --disable-altivec --dis libavutil 51. 73.101 / 51. 73.101
libavcodec 54. 59.100 / 54. 59.100
libavformat 54. 29.104 / 54. 29.104
libavdevice 54. 2.101 / 54. 2.101
libavfilter 3. 17.100 / 3. 17.100
libswscale 2. 1.101 / 2. 1.101
libswresample 0. 15.100 / 0. 15.100
libpostproc 52. 0.100 / 52. 0.100
[wav @ 0xac8cc0] max_analyze_duration 5000000 reached at 5002667
Input #0, wav, from 'convert.wav':
Duration: 00:00:08.16, bitrate: 3072 kb/s
Stream #0:0: Audio: pcm_s32le ([1][0][0][0] / 0x0001), 48000 Hz, stereo, s32, 3072 kb/s

Code:

file convert.wav
convert.wav: RIFF (little-endian) data, WAVE audio, stereo 48000 Hz

I had a mail exchange (in german) with phillips in order to know how to read the files in a linux programm. The answer is

Quote:

Von: "support@speech.com" <support@speech.com>
An: xxxxxx
Gesendet: 13:05 Dienstag, 14.Juli 2015
Betreff: Re: AW: Ticket (SUP-126398) DE - xxxxxx / 1713977606
Sehr geehrter Herr xxxxxx,
Philips versteht sich als Anbieter professioneller Diktiersysteme. In der Zielgruppe, die mit diesen Systemen arbeitet (Mediziner, Juristen, Architekten, Gutachter), spielt Linux faktisch keine Rolle. Die Entwicklung und Wartung von Anwendungen unter Linux wre also unwirtschaftlich und wrde unntig Entwickler-Resourcen binden. Es ist derzeit auch kein Trend erkennbar, dass Linux-Systeme in diesem Bereich zunehmen knnten. Oder ganz platt formuliert: Damit lsst sich einfach kein Geld verdienen.
Mit freundlichen Gren
Lutz Weidhase

Service/Support
Speech Processing Solutions

E-mail: support@speech.com, http://www.philips.com/dictation

=====

Danke. Koennten sie diese Codecs fuer linux zur Verfgung stellen? Es gibt viele linux PCs weltweit und Philips wuerde damit sehr gut stehen.
Gruss,
xxxxxx
Gesendet von meinem BlackBerry 10-Smartphone.

=====

Sehr geehrter Herr xxxxxx,
der ADPCM-Codec steht nur fr Windows-Systeme zur Verfgung. Eine Version fr Linux-Systeme bieten wir nicht an.
Mit freundlichen Gren

===== original question =====

I cannot listen the WAV files created by the philips app in a linux programm (aplay, audacity etc.). It seems the format is only readable in windows7, after installing codecs.
Can you please help and advise how to play the file in "audacity" or with "aplay" ?

So, phillips has currently no interess to help because in the domain of dictation no money can be earn. Not a funny answer.

I will try to convert the file in win .. :-( http://www.wikihow.com/Convert-Any-T...s-Media-Player

Shadow_7 07-26-2015 11:57 AM

Unless the file is all zeroes, you should have had something audible. Maybe not legible, but audible. You can take the linux kernel and create white noise from it doing the sox method.

Open it in audacity and look at the resulting waveform. If it's a flat line then the file was all zeroes or the volume is too low. Effect -> Amplify can increase the audio level in audacity. If it's zeroed, then 50 will be the max amplification. The -v 0.5 at the front can probably be ommited for more gain. But it's needed if sending it raw CD data or the linux kernel. The 32 might need to be 16, or someother value depending on bits. A sample file goes a long way.

ondoho 07-29-2015 02:04 PM

Quote:

Originally Posted by Philips
Sehr geehrter Herr xxxxxx,
Philips versteht sich als Anbieter professioneller Diktiersysteme. In der Zielgruppe, die mit diesen Systemen arbeitet (Mediziner, Juristen, Architekten, Gutachter), spielt Linux faktisch keine Rolle. Die Entwicklung und Wartung von Anwendungen unter Linux wre also unwirtschaftlich und wrde unntig Entwickler-Resourcen binden. Es ist derzeit auch kein Trend erkennbar, dass Linux-Systeme in diesem Bereich zunehmen knnten. Oder ganz platt formuliert: Damit lsst sich einfach kein Geld verdienen.

well that sort of answer was to be expected... but that guy seems to have a sense of humour at least.

floppy_stuttgart 07-31-2015 05:14 PM

Quote:

Originally Posted by Shadow_7 (Post 5396508)
Unless the file is all zeroes, you should have had something audible. Maybe not legible, but audible. You can take the linux kernel and create white noise from it doing the sox method.

Open it in audacity and look at the resulting waveform. If it's a flat line then the file was all zeroes or the volume is too low. Effect -> Amplify can increase the audio level in audacity. If it's zeroed, then 50 will be the max amplification. The -v 0.5 at the front can probably be ommited for more gain. But it's needed if sending it raw CD data or the linux kernel. The 32 might need to be 16, or someother value depending on bits. A sample file goes a long way.

With "not audible", I mean a "noise" which is not the original sound I should hear.
Sorry, but I am totally incompetent. So, I need clear command lines or commands.. I tried
Code:

sox -t raw -e signed -b 32 --endian little -c 1 -r 16000 org.wav -t wav -c 2 -r 48000 convert.wav
which give the message:
Quote:

sox WARN rate: rate clipped 23954 samples; decrease volume?
and
Code:

aplay convert.wav
(noise)
give the message:
Quote:

Wiedergabe: WAVE 'convert.wav' : Signed 32 bit Little Endian, Rate: 48000 Hz, stereo
and
Code:

audacity convert.wav
give the message
Code:

ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm_dmix.c:957:(snd_pcm_dmix_open) The dmix plugin supports only playback stream
Cannot connect to server socket err = Datei oder Verzeichnis nicht gefunden
Cannot connect to server request channel
jack server is not running or cannot be started
Expression 'ret' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1670
Expression 'AlsaOpen( &alsaApi->baseHostApiRep, params, streamDir, &self->pcm )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1830
Expression 'PaAlsaStreamComponent_Initialize( &self->capture, alsaApi, inParams, StreamDirection_In, NULL != callback )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2092
Expression 'PaAlsaStream_Initialize( stream, alsaHostApi, inputParameters, outputParameters, sampleRate, framesPerBuffer, callback, streamFlags, userData )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2764
ALSA lib pcm_dsnoop.c:612:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dsnoop.c:612:(snd_pcm_dsnoop_open) unable to open slave
...
ALSA lib pcm_dsnoop.c:612:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dsnoop.c:612:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dsnoop.c:612:(snd_pcm_dsnoop_open) unable to open slave
Expression 'ret' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1670
Expression 'AlsaOpen( &alsaApi->baseHostApiRep, params, streamDir, &self->pcm )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1830
Expression 'PaAlsaStreamComponent_Initialize( &self->capture, alsaApi, inParams, StreamDirection_In, NULL != callback )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2092
Expression 'PaAlsaStream_Initialize( stream, alsaHostApi, inputParameters, outputParameters, sampleRate, framesPerBuffer, callback, streamFlags, userData )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2764
Expression 'stream->playback.pcm' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 4541
Expression 'stream->playback.pcm' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 4541

= noise by clicking "play".


All times are GMT -5. The time now is 10:26 PM.