Hello,
First I want to say thank you to the developers of mopidy for all there work spent in to this great tool.
I hope that I post in the right category, if not feel free to move to the correct one.
I am currently doing a POC to develop a frontend using RFID cards to load playlists in order to make playing audio books easy for kids. In order to have a good user experience I planned to announce the loaded Playlist with text to speach. To have a quick success I use google translate for my tests which is basically a mp3 stream from http. Unfortunately after this stream is played the following track which is a mp3 file has a distorted sound. If I skip in iris one track forward the sound is OK.
My setup is a Raspi 4 with 2GB and audio output alsasink.
Here is my code I am using:
def my_callback(self,channel):
global counter
self.core.tracklist.clear()
playlist_name="Ich spiele für Dich " + self.playlists[counter].name
logger.info("Playing: {0}".format(playlist_name))
self.core.tracklist.add(uris=["http://translate.google.com/translate_tts?ie=UTF-8&client=tw-ob&q=" +playlist_name+"&tl=de"])
tracks = self.core.playlists.get_items(self.playlists[counter].uri).get()
track_uris = [track.uri for track in tracks]
logger.info("Track URI: {0}".format(track_uris))
self.core.tracklist.add(uris=track_uris)
self.core.playback.play()
counter += 1
The complete code of the frontend is available at github:
import logging
from mopidy import core
import pykka
import RPi.GPIO as GPIO
logger = logging.getLogger(__name__) #mopidy_figlio.frontend
class FiglioFrontend(pykka.ThreadingActor, core.CoreListener):
def __init__(self, config, core):
super().__init__()
self.core = core
self.config = config["Figlio"]
self.playlists = []
global counter
counter = 0
GPIO.setwarnings(True)
GPIO.setmode(GPIO.BCM)
GPIO.setup(25, GPIO.IN, pull_up_down=GPIO.PUD_UP)
This file has been truncated. show original
Any help is much appreciated.
greets
Mike
Could you please read Troubleshooting — Mopidy 3.1.1-1-gf17acacf documentation and provide the deps
and config
and also a debug log.
Hello Nick,
Thanks for your quick reply.
How can I upload files or do you want me to paste all output in to the reply?
I found only a solution to upload pictures
Thanks
Mike
Definitely no pictures thanks. You should be able to paste the first two, and the log you can put at https://dpaste.com/
OK, thanks
[core]
cache_dir = $XDG_CACHE_DIR/mopidy
config_dir = $XDG_CONFIG_DIR/mopidy
data_dir = $XDG_DATA_DIR/mopidy
max_tracklist_length = 10000
restore_state = false
[logging]
verbosity = 0
format = %(levelname)-8s %(asctime)s [%(process)d:%(threadName)s] %(name)s\n %(message)s
color = true
config_file =
[loglevels]
mopidy_figlio.frontend = info
[audio]
mixer = software
mixer_volume = 30
output = alsasink
buffer_time =
[proxy]
scheme =
hostname =
port =
username =
password =
[Figlio]
enabled = true
[file]
enabled = true
media_dirs =
~/Music|Music
excluded_file_extensions =
.directory
.html
.jpeg
.jpg
.log
.nfo
.pdf
.png
.txt
.zip
show_dotfiles = false
follow_symlinks = false
metadata_timeout = 1000
[http]
enabled = true
hostname = 192.168.0.10
port = 6680
zeroconf = Mopidy HTTP server on $hostname
allowed_origins =
csrf_protection = true
default_app = mopidy
[m3u]
enabled = true
base_dir = ~/Music
default_encoding = latin-1
default_extension = .m3u8
playlists_dir = ~/Music
[softwaremixer]
enabled = true
[stream]
enabled = true
protocols =
http
https
mms
rtmp
rtmps
rtsp
metadata_blacklist =
timeout = 5000
[iris]
enabled = true
country = NZ
locale = en_NZ
spotify_authorization_url = https://jamesbarnsley.co.nz/iris/auth_spotify.php
lastfm_authorization_url = https://jamesbarnsley.co.nz/iris/auth_lastfm.php
genius_authorization_url = https://jamesbarnsley.co.nz/iris/auth_genius.php
data_dir = $XDG_DATA_DIR/iris
Executable: /usr/local/bin/mopidy
Platform: Linux-5.10.17-v7l±armv7l-with-debian-10.9
Python: CPython 3.7.3 from /usr/lib/python3.7
Mopidy: 3.1.1 from /usr/local/lib/python3.7/dist-packages
Pykka: 3.0.1 from /usr/local/lib/python3.7/dist-packages
importlib-metadata: 4.5.0 from /usr/local/lib/python3.7/dist-packages
typing-extensions: 3.10.0.0 from /usr/local/lib/python3.7/dist-packages
zipp: 3.4.1 from /usr/local/lib/python3.7/dist-packages
requests: 2.21.0 from /usr/lib/python3/dist-packages
tornado: 6.1 from /usr/local/lib/python3.7/dist-packages
setuptools: 40.8.0 from /usr/lib/python3/dist-packages
mopidy-figlio: 0.0.1 from /home/pi/develop/mopidy-figlio
Mopidy: 3.1.1 from /usr/local/lib/python3.7/dist-packages
Pykka: 3.0.1 from /usr/local/lib/python3.7/dist-packages
importlib-metadata: 4.5.0 from /usr/local/lib/python3.7/dist-packages
typing-extensions: 3.10.0.0 from /usr/local/lib/python3.7/dist-packages
zipp: 3.4.1 from /usr/local/lib/python3.7/dist-packages
setuptools: 40.8.0 from /usr/lib/python3/dist-packages
Mopidy-Iris: 3.58.0 from /usr/local/lib/python3.7/dist-packages
Pykka: 3.0.1 from /usr/local/lib/python3.7/dist-packages
importlib-metadata: 4.5.0 from /usr/local/lib/python3.7/dist-packages
typing-extensions: 3.10.0.0 from /usr/local/lib/python3.7/dist-packages
zipp: 3.4.1 from /usr/local/lib/python3.7/dist-packages
Mopidy: 3.1.1 from /usr/local/lib/python3.7/dist-packages
setuptools: 40.8.0 from /usr/lib/python3/dist-packages
GStreamer: 1.14.4.0 from /usr/lib/python3/dist-packages/gi
Detailed information:
Python wrapper: python-gi 3.30.4
Relevant elements:
Found:
uridecodebin
souphttpsrc
appsrc
alsasink
osssink
oss4sink
id3demux
id3v2mux
lamemp3enc
mpegaudioparse
mpg123audiodec
vorbisdec
vorbisenc
vorbisparse
oggdemux
oggmux
oggparse
flacdec
flacparse
shout2send
Not found:
pulsesink
flump3dec
mad
type or paste code here
Hello,
I implemented GStreamer in my frontend to play announcments as was not successful using mopidy.audio.
Current problem I have is that the playing of MP3 tracks doesnt stop with self.core.playback.stop(). The track continous playing even that playback.get_state() says its stopped.
With HTML streams I dont have this issue.
Current code could be found here:
I will post deps, config and debugs later.
Any help is much appreceated.
thanks
Mike
Executable: /usr/local/bin/mopidy
Platform: Linux-5.10.17-v7l±armv7l-with-debian-10.9
Python: CPython 3.7.3 from /usr/lib/python3.7
Mopidy: 3.1.1 from /usr/local/lib/python3.7/dist-packages
Pykka: 3.0.1 from /usr/local/lib/python3.7/dist-packages
importlib-metadata: 4.5.0 from /usr/local/lib/python3.7/dist-packages
zipp: 3.4.1 from /usr/local/lib/python3.7/dist-packages
typing-extensions: 3.10.0.0 from /usr/local/lib/python3.7/dist-packages
requests: 2.21.0 from /usr/lib/python3/dist-packages
setuptools: 40.8.0 from /usr/lib/python3/dist-packages
tornado: 6.1 from /usr/local/lib/python3.7/dist-packages
Mopidy-Iris: 3.58.0 from /usr/local/lib/python3.7/dist-packages
Pykka: 3.0.1 from /usr/local/lib/python3.7/dist-packages
importlib-metadata: 4.5.0 from /usr/local/lib/python3.7/dist-packages
zipp: 3.4.1 from /usr/local/lib/python3.7/dist-packages
typing-extensions: 3.10.0.0 from /usr/local/lib/python3.7/dist-packages
setuptools: 40.8.0 from /usr/lib/python3/dist-packages
Mopidy: 3.1.1 from /usr/local/lib/python3.7/dist-packages
mopidy-figlio: 0.0.1 from /home/pi/develop/mopidy-figlio
Mopidy: 3.1.1 from /usr/local/lib/python3.7/dist-packages
Pykka: 3.0.1 from /usr/local/lib/python3.7/dist-packages
importlib-metadata: 4.5.0 from /usr/local/lib/python3.7/dist-packages
zipp: 3.4.1 from /usr/local/lib/python3.7/dist-packages
typing-extensions: 3.10.0.0 from /usr/local/lib/python3.7/dist-packages
setuptools: 40.8.0 from /usr/lib/python3/dist-packages
GStreamer: 1.14.4.0 from /usr/lib/python3/dist-packages/gi
Detailed information:
Python wrapper: python-gi 3.30.4
Relevant elements:
Found:
uridecodebin
souphttpsrc
appsrc
alsasink
osssink
oss4sink
id3demux
id3v2mux
lamemp3enc
mpegaudioparse
mpg123audiodec
vorbisdec
vorbisenc
vorbisparse
oggdemux
oggmux
oggparse
flacdec
flacparse
shout2send
Not found:
pulsesink
flump3dec
mad
[core]
cache_dir = /tmp
config_dir = ~/.config/mopidy
data_dir = ~/Music/data
max_tracklist_length = 10000
restore_state = false
[logging]
verbosity = 0
format = %(levelname)-8s %(asctime)s [%(process)d:%(threadName)s] %(name)s\n %(message)s
color = false
config_file =
[loglevels]
mopidy_figlio.frontend = info
[audio]
mixer = software
mixer_volume = 5
output = alsasink
buffer_time = 5000
[proxy]
scheme =
hostname =
port =
username =
password =
[Figlio]
enabled = true
[file]
enabled = true
media_dirs =
~/Music|Music
excluded_file_extensions =
.directory
.html
.jpeg
.jpg
.log
.nfo
.pdf
.png
.txt
.zip
show_dotfiles = false
follow_symlinks = false
metadata_timeout = 1000
[http]
enabled = true
hostname = 192.168.0.10
port = 6680
zeroconf = Mopidy HTTP server on $hostname
allowed_origins =
csrf_protection = true
default_app = mopidy
[m3u]
enabled = true
base_dir = ~/Music
default_encoding = latin-1
default_extension = .m3u8
playlists_dir = ~/Music
[softwaremixer]
enabled = true
[stream]
enabled = true
protocols =
http
https
mms
rtmp
rtmps
rtsp
metadata_blacklist =
timeout = 5000
[iris]
enabled = true
country = NZ
locale = en_NZ
spotify_authorization_url = https://jamesbarnsley.co.nz/iris/auth_spotify.php
lastfm_authorization_url = https://jamesbarnsley.co.nz/iris/auth_lastfm.php
genius_authorization_url = https://jamesbarnsley.co.nz/iris/auth_genius.php
data_dir = $XDG_DATA_DIR/iris
system
Closed
December 30, 2021, 6:53am
13
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.