Multichannel audio output

Questions about codecs, DVD playback, web plugins...
Forum rules
Before you post please read how to get help
Post Reply
mkarcz
Level 1
Level 1
Posts: 2
Joined: Wed Sep 09, 2015 8:06 pm

Multichannel audio output

Post by mkarcz » Sat Jul 07, 2018 11:54 pm

Hello,

First of all, greetings to all forum members.
This is my first post here I think.
I have Linux Mint 18.3, MATE 64-bit installed on Toshiba Satellite T115D-S1125 laptop.
I installed festival (speech synthesizer) and have this simple script added in cron to tell me time every 5 minutes:

0,5,10,15,20,25,30,35,40,45,50,55 * * * * ~/bin/saytime.sh >> ~/trace/saytime.sh 2>&1

mkarcz@mkarcz-Satellite-T115D ~ $ cat ~/bin/saytime.sh
#!/bin/bash

echo "The time is - `date +%_H` hours and `date +%_M` minutes." | festival --tts

The problem with that is, when I am utilizing sound on the laptop, e.g. listen to music or watch videos, I don't hear the time spoken.
Only after I close the application utilizing sound or application stops actively utilizing sound, the system plays the spoken by the script time and it seems it plays the queued previously instances, seems like playing them all at once.
Is there a way to make the sound output accept multiple applications / sound sinks at the same time? So when I listen to the music I also hear the script saying the time immediately?
I couldn't find any relevant parameters in sound configuration.

Thank you.
---
Marek K

User avatar
MrEen
Level 6
Level 6
Posts: 1464
Joined: Mon Jun 12, 2017 8:39 pm

Re: Multichannel audio output

Post by MrEen » Sun Jul 08, 2018 11:04 am

Hi mkarcz. Welcome to the forum.

My first suspicion is festival itself. It sounds as though it is recognizing that sound is already playing and is queuing its output while it waits for silence. Have you tried looking through the options or preferences of the program for other output settings?

It's also possible the other players on your system are "hogging" sound. Can you play music while watching a video and hear both? If yes, my first suspicion seems the more likely candidate.

Basically, if everything is playing sound through pulseaudio, you should be able to hear all sources at the same time. If something tries to play sound through a direct-to-hardware ALSA device (such as hw:0,) sound will be unavailable to all other programs.

The last possibility I have is if anything is running through jackd. By default, running jackd prevents pulseaudio from working. It's a bit of a mess to try to set up properly, but certainly can be done, usually.)

User avatar
phd21
Level 16
Level 16
Posts: 6956
Joined: Thu Jan 09, 2014 9:42 pm
Location: Florida

Re: Multichannel audio output

Post by phd21 » Sun Jul 08, 2018 12:29 pm

Hi mkarcz

1.) FYI: There may already be an option to have the time spoken, and there are probably talking clocks applications, applets, desklets, widgets available ... "wakeup" in the "Synaptic Package Manager (SPM)", "saytime", etc...

Make Ubuntu Speak The Time On The Hour, Every Hour - OMG! Ubuntu!
https://www.omgubuntu.co.uk/2016/09/lin ... ple-script

Wakeup - customizable and extensible talking alarm clock - LinuxLinks
https://www.linuxlinks.com/Wakeup/

Ubuntu: talking clock every hours | DotMana
http://www.dotmana.com/weblog/2013/02/u ... ery-hours/

software recommendation - How do you get an hourly talking clock? - Ask Ubuntu
https://askubuntu.com/questions/295792/ ... king-clock

talking clock for ubuntu?
https://ubuntuforums.org/showthread.php ... ost3130400

2.) In my KDE system, I can select a setting through the "Sound Settings" to create a virtual device, see screenshot. May have to logout or restart for changes to take.

How to Play Sound Through Two or More Output Devices in Linux - Make Tech Easier
https://www.maketecheasier.com/play-sou ... ces-linux/

PulseAudio: combine sinks for simultaneous output | Deseret Tech
http://www.deseret-tech.com/journal/pul ... us-output/

Create combined source in pulseaudio - Unix & Linux Stack Exchange
https://unix.stackexchange.com/question ... pulseaudio


Hope this helps ...
.
KDE_simultaneous_sound1.jpg
KDE simultaneous sound
Last edited by phd21 on Sun Jul 08, 2018 1:28 pm, edited 2 times in total.
Phd21: Mint KDE 17.3 & 18.3, 64-bit Awesome OS, Ancient Dell OptiPlex 780 Core2Duo E8400 3GHz,4gb Ram,256gb SDD, Video: Intel 4 Graphics, DVD Lightscribe. Why I use KDE?:https://opensource.com/life/15/4/9-reasons-to-use-kde

User avatar
trytip
Level 8
Level 8
Posts: 2134
Joined: Tue Jul 05, 2016 1:20 pm

Re: Multichannel audio output

Post by trytip » Sun Jul 08, 2018 1:02 pm

start be going into .config/pulse delete everything except if you have presets folder or a default.pa file then open terminal and use pulseaudio -k this will restart and refresh pulseaudio

test your script

do you have these installed? a few voices and some speech tools

Code: Select all

festival
festlex-cmu
festlex-poslex
festvox-kallpc16k
festvox-us1
mbrola
mbrola-us1
Image

Post Reply

Return to “Sound, Multimedia, & Codecs”