Home of the Squeezebox™ & Transporter® network music players.
Page 2 of 2 FirstFirst 12
Results 11 to 20 of 20
  1. #11
    Junior Member
    Join Date
    Apr 2019
    Posts
    10
    Quote Originally Posted by d6jg View Post
    Another approach may be to take the wav input into liquidsoap and then stream it via icecast to LMS as an mp3.
    I've posted another post with the details, but again, it's not showing up. I'll try again in a few minutes as it may be that my posts are still being moderated. If this goes through without moderation, I'll assume the last post was somehow lost...

    Since most of the automation is running on an RPi3+, I'm trying to minimize the overhead. Since I anticipate most of the Pico TTS outputs to be small files, I can script lame to convert it to MP3 and then stream it. Ideally, if it's possible to get LMS to recognize the Pico TTS-generated wav files, it would save some overhead and act as a template to do allow other possible wav files to be streamed. I'm just in over my head right now, so if I get a working example, it's off to the races for lots of automation folks to leverage it with LMS in the future...

  2. #12
    Junior Member
    Join Date
    Apr 2019
    Posts
    10
    double post - sorry. I reposted the mplayer output twice. It's on the prior page.
    Last edited by RipNCode; 2019-04-26 at 13:05. Reason: double post

  3. #13
    Senior Member
    Join Date
    Oct 2005
    Location
    Ireland
    Posts
    17,809
    Quote Originally Posted by RipNCode View Post
    I've posted another post with the details, but again, it's not showing up. I'll try again in a few minutes as it may be that my posts are still being moderated. If this goes through without moderation, I'll assume the last post was somehow lost....
    Post with links from new users get moderated

    Just get the output from mplayer and include it in the post.

  4. #14
    Junior Member
    Join Date
    Apr 2019
    Posts
    10
    Quote Originally Posted by bpa View Post
    Post with links from new users get moderated

    Just get the output from mplayer and include it in the post.
    In case you didn't see that is showed up on the prior page:

    Playing test.wav.
    get_path('sub/') -> '/home/rip/.mplayer/sub/'
    [file] File size is 136492 bytes
    STREAM: [file] test.wav
    STREAM: Description: File
    STREAM: Author: Albeu
    STREAM: Comment: based on the code from ??? (probably Arpi)
    libavformat version 58.20.100 (internal)
    Configuration: --enable-gpl --enable-postproc
    LAVF_check: WAV / WAVE (Waveform Audio)
    Checking for YUV4MPEG2
    ASF_check: not ASF guid!
    Checking for REAL
    Checking for SMJPEG
    Searching demuxer type for filename test.wav ext: .wav
    Trying demuxer 17 based on filename extension
    ==> Found audio stream: 0
    ======= WAVE Format =======
    Format Tag: 1 (0x1)
    Channels: 1
    Samplerate: 16000
    avg byte/sec: 32000
    Block align: 2
    bits/sample: 16
    cbSize: 0
    ================================================== ========================
    demux_audio: audio data 0x2C - 0x2152C
    Audio only file format detected.
    Load subtitles in ./
    get_path('sub/') -> '/home/rip/.mplayer/sub/'
    ================================================== ========================
    Opening audio decoder: [pcm] Uncompressed PCM audio decoder
    dec_audio: Allocating 2048 + 131072 = 133120 bytes for output buffer.
    AUDIO: 16000 Hz, 1 ch, s16le, 256.0 kbit/100.00% (ratio: 32000->32000)
    Selected audio codec: [pcm] afm: pcm (Uncompressed PCM)
    ================================================== ========================
    Building audio filter chain for 16000Hz/1ch/s16le -> 0Hz/0ch/??...
    [libaf] Adding filter dummy
    [dummy] Was reinitialized: 16000Hz/1ch/s16le
    [dummy] Was reinitialized: 16000Hz/1ch/s16le
    Trying preferred audio driver 'alsa', options '[none]'
    alsa-init: requested format: 16000 Hz, 1 channels, 9
    alsa-init: using ALSA 1.1.7
    alsa-init: setup for 1/2 channel(s)
    alsa-init: using device default
    alsa-init: opening device in blocking mode
    [AO_ALSA] alsa-lib: pcm_dmix.c:1063snd_pcm_dmix_open) unable to create IPC semaphore
    [AO_ALSA] Playback open error: Permission denied
    Failed to initialize audio driver 'alsa'
    Trying every known audio driver...
    ao2: 16000 Hz 1 chans s16le
    audio_setup: using '/dev/dsp' dsp device
    audio_setup: using '/dev/mixer' mixer device
    audio_setup: using 'pcm' mixer device
    [AO OSS] audio_setup: Can't open audio device /dev/dsp: Device or resource busy
    alsa-init: requested format: 16000 Hz, 1 channels, 9
    alsa-init: using ALSA 1.1.7
    alsa-init: setup for 1/2 channel(s)
    alsa-init: using device default
    alsa-init: opening device in blocking mode
    [AO_ALSA] alsa-lib: pcm_dmix.c:1063snd_pcm_dmix_open) unable to create IPC semaphore
    [AO_ALSA] Playback open error: Permission denied
    AO: [pulse] 16000Hz 1ch s16le (2 bytes per sample)
    AO: Description: PulseAudio audio output
    AO: Author: Lennart Poettering
    Building audio filter chain for 16000Hz/1ch/s16le -> 16000Hz/1ch/s16le...
    [dummy] Was reinitialized: 16000Hz/1ch/s16le
    [dummy] Was reinitialized: 16000Hz/1ch/s16le
    Video: no video
    Freeing 0 unused video chunks.
    Starting playback...
    Increasing filtered audio buffer size from 0 to 9024
    A: 4.0 (03.9) of 4.0 (04.0) 0.0%
    ds_fill_buffer: EOF reached (stream: audio)
    ds_fill_buffer: EOF reached (stream: audio)
    A: 4.0 (04.0) of 4.0 (04.0) 0.0%
    ds_fill_buffer: EOF reached (stream: audio)
    A: 4.1 (04.0) of 4.0 (04.0) 0.0%
    EOF code: 1

    Uninit audio filters...
    [libaf] Removing filter dummy
    Uninit audio: pcm
    vo: x11 uninit called but X11 not initialized..

    Exiting... (End of file)

  5. #15
    Senior Member
    Join Date
    Feb 2011
    Location
    Cheshire, UK
    Posts
    4,059
    In the middle there are lots of “permission denied” errors when trying to open for playback
    VB2.4 storage QNAP TS419p (NFS)
    Living Room - Joggler & SB3 -> Onkyo TS606 -> Celestion F20s
    Office - Pi3+Sreen -> Sony TAFE320 -> Celestion F10s / Pi2+DAC & SB3 -> Onkyo CRN755 -> Wharfedale Modus Cubes
    Dining Room -> SB Boom
    Kitchen -> UE Radio (upgraded to SB Radio)
    Bedroom (Bedside) - Pi2+DAC ->ToppingTP21 ->AKG Headphones
    Bedroom (TV) - SB Touch ->Sherwood AVR ->Mordaunt Short M10s
    Everything controlled by iPeng

  6. #16
    Junior Member
    Join Date
    Apr 2019
    Posts
    10
    Quote Originally Posted by d6jg View Post
    In the middle there are lots of “permission denied” errors when trying to open for playback
    True, but it's a bit of a misnomer. I generated the file on the Pi with Pico TTS and downloaded it to my admin machine to play it back, just to get the data from mplayer. The Pi doesn't have audio output directly-only a connection to the LMS via the integrated audio sink. So the errors being thrown are because my admin machine isn't set up for this. I just did it to make getting the verbose data a bit quicker. As I mentioned, all other audio playback is not a problem. Hopefully, when done, Pico TTS will not even create a file - it will just stream the audio out directly. Unfortunately, it only does so as a wav...

  7. #17
    Senior Member
    Join Date
    Oct 2005
    Location
    Ireland
    Posts
    17,809
    Code:
    Playing test.wav.
    get_path('sub/') -> '/home/rip/.mplayer/sub/'
    [file] File size is 136492 bytes
    STREAM: [file] test.wav
    STREAM: Description: File
    STREAM: Author: Albeu
    STREAM: Comment: based on the code from ??? (probably Arpi)
    libavformat version 58.20.100 (internal)
    Configuration: --enable-gpl --enable-postproc
    LAVF_check: WAV / WAVE (Waveform Audio)
    Checking for YUV4MPEG2
    ASF_check: not ASF guid!
    Checking for REAL
    Checking for SMJPEG
    Searching demuxer type for filename test.wav ext: .wav
    Trying demuxer 17 based on filename extension
    ==> Found audio stream: 0
    ======= WAVE Format =======
    Format Tag: 1 (0x1)
    Channels: 1
    Samplerate: 16000
    avg byte/sec: 32000
    Block align: 2
    bits/sample: 16
    Pity there is no URL as mplayer says it guessed the format based on the file name !! You did use an URL ? Can you post the command you used so the URL & filename can be examined also the full log.

    A couple of other problem - 1 channel and 16kHz a sample rate - neither s these are supported by SB players - so LMS will have trasncode the stream into 2 channel and at least 32kHz.


    THis is a fragment the sort of output that is neede to determine how the wav is being streamed (i.e. all the HTTP stuff)
    Code:
    mplayer -v -playlist http://www.somafm.com/groovesalad.pls
    Filename for url is now http://www.somafm.com/groovesalad.pls
    Filename for url is now http://www.somafm.com/groovesalad.pls
    STREAM_HTTP(1), URL: http://www.somafm.com/groovesalad.pls
    Resolving www.somafm.com for AF_INET6...
    
    Couldn't resolve name for AF_INET6: www.somafm.com
    Resolving www.somafm.com for AF_INET...
    Connecting to server www.somafm.com[74.217.192.206]: 80...
    
    --- HTTP DEBUG HEADER --- START ---
    protocol:           [HTTP/1.1]
    http minor version: [1]
    uri:                [(null)]
    method:             [(null)]
    status code:        [301]
    reason phrase:      [Moved Permanently]
    body size:          [194]
    Fields:
     0 - Server: nginx/1.10.3 (Ubuntu)
     1 - Date: Fri, 26 Apr 2019 21:40:01 GMT
     2 - Content-Type: text/html
     3 - Content-Length: 194
     4 - Connection: close
     5 - Location: http://somafm.com/groovesalad.pls
    --- HTTP DEBUG HEADER --- END ---
    Filename for url is now http://somafm.com/groovesalad.pls
    Resolving somafm.com for AF_INET6...
    
    Couldn't resolve name for AF_INET6: somafm.com
    Resolving somafm.com for AF_INET...
    Connecting to server somafm.com[74.217.192.208]: 80...
    
    --- HTTP DEBUG HEADER --- START ---
    protocol:           [HTTP/1.1]
    http minor version: [1]
    uri:                [(null)]
    method:             [(null)]
    status code:        [200]
    reason phrase:      [OK]
    body size:          [511]
    Fields:
     0 - Server: nginx/1.10.3 (Ubuntu)
     1 - Date: Fri, 26 Apr 2019 21:40:02 GMT
     2 - Content-Type: audio/x-scpls
     3 - Content-Length: 511
     4 - Connection: close
     5 - Expires: Fri, 26 Apr 2019 21:40:12 GMT
     6 - Cache-Control: max-age=10
     7 - X-Proxy-Cache: MISS
     8 - X-Proxy-Cache: MISS
     9 - Access-Control-Allow-Origin: *
     10 - Accept-Ranges: bytes
    --- HTTP DEBUG HEADER --- END ---
    Content-Length: [511]
    Content-Type: [audio/x-scpls]
    Cache size set to 320 KBytes
    Last edited by bpa; 2019-04-26 at 14:45.

  8. #18
    Junior Member
    Join Date
    Apr 2019
    Posts
    10
    Quote Originally Posted by bpa View Post
    Pity there is no URL as mplayer says it guessed the format based on the file name !! You did use an URL ? Can you post the command you used so the URL & filename can be examined.

    A couple of other problem - 1 channel and 16kHz a sample rate - neither s these are supported by SB players - so LMS will have trasncode the stream into 2 channel and at least 32kHz.
    The URL is probably encapsulated in the java binding. I'd have to figure out to pull that out as it's not obvious. In this case, I made Pico create a file to pull the relevant metadata.

    pico2wave -w "test.wav" "Let's hope this audio file works this time!"

    From there, I took test.wav (which doesn't stream with any audio output) and ran it on a local laptop with mplayer as a file to pull the data. I also used lame to convert test.wav to test.mp3, and that does stream correctly to the SB player. The trick I'm going to run into is that I should be able to have a TTS system dynamically (no file creation) convert strings to speech and stream them on the fly.

    I think the issue of SB players not supporting 1 channel/16kHz is probably the issue at hand. I don't believe I can make the Pico output anything else, so this may be a dead end if it's not possible to get a player to work with the current output. Maybe it's time to go back to the drawing board on this design...

  9. #19
    Senior Member
    Join Date
    Oct 2005
    Location
    Ireland
    Posts
    17,809
    Quote Originally Posted by RipNCode View Post
    The URL is probably encapsulated in the java binding. I'd have to figure out to pull that out as it's not obvious. In this case, I made Pico create a file to pull the relevant metadata.

    pico2wave -w "test.wav" "Let's hope this audio file works this time!"

    From there, I took test.wav (which doesn't stream with any audio output) and ran it on a local laptop with mplayer as a file to pull the data. I also used lame to convert test.wav to test.mp3, and that does stream correctly to the SB player. The trick I'm going to run into is that I should be able to have a TTS system dynamically (no file creation) convert strings to speech and stream them on the fly.
    I'm sorry I don't understand the problem. You say LMS can't play a http stream WAV LMS but yet you cannot show mplayer playing the same URL.

    Playing the file does not help with how a file is streamed over http

    The http handling is half the issue with playing on LMS but it the issue that needs most work.

    I think the issue of SB players not supporting 1 channel/16kHz is probably the issue at hand. I don't believe I can make the Pico output anything else, so this may be a dead end if it's not possible to get a player to work with the current output. Maybe it's time to go back to the drawing board on this design...
    Transcoding from 1 channel 16Khz to anything is dead easy - once an URL and mplayer output has been given. There have been a number of users who have got TTS working with LMS players for announcements. A recent one is https://forums.slimdevices.com/showt...-notifications but I think their approach may not work for you.
    Last edited by bpa; 2019-04-26 at 23:37.

  10. #20
    Senior Member
    Join Date
    Apr 2005
    Location
    UK/London
    Posts
    1,812
    Thread over on OpenHAB shows a bit more about how things work ... and also hints at a possible workaround.
    i.e. move from PicoTTS to Google Cloud Voice (whatever that is)

    https://community.openhab.org/t/solv...-for-tts/67652
    Paul Webster
    http://dabdig.blogspot.com
    Author Radio France (FIP etc) plugin

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •