Git Product home page Git Product logo

lyrebird's People

Contributors

aosync avatar bgkillas avatar bluemancz avatar dudecake avatar megabytesofrem avatar ps-gill avatar st331h0rs3 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lyrebird's Issues

discord link broken

this is a nice project. thank you for creating it. the discord invite link needs to be replaced.

utils.destroy_lock() fails to unlock

On application shutdown, the lock fails to properly unlock.

Traceback (most recent call last):
  File "/nix/store/m26bw7cha9cvnk4c0vy2767s1kxir1dv-lyrebird-unstable-2020-08-19/share/lyrebird/lyrebird/mainwindow.py", line 271, in close
    utils.destroy_lock()
  File "/nix/store/m26bw7cha9cvnk4c0vy2767s1kxir1dv-lyrebird-unstable-2020-08-19/share/lyrebird/lyrebird/core/utils.py", line 101, in destroy_lock
    lock_file_path.unlink(missing_ok=True)
TypeError: unlink() got an unexpected keyword argument 'missing_ok'

~/.lyrebird.lock persists, application is stuck & needs to be killed manually.


lock_file_path = Path(Path.home() / '.lyrebird.lock')

Wouldn't it be better to put the lockfile into the system's tmpdir btw?

Created config file as root

I just installed the program through the install.sh (without sudo, but I configured sudo to not ask for a password when needed). After testing it in the Discord audio settings I realised that there is a unexpected high delay. Therefore I wanted to adjust the config file. But trying to edit the config file normally resulted in no permissions. Checking the permissions and ownership returned the following:
[13/08/20 2:14:32] littles@yui ~/lyrebird (master) $ ls -lah ~/.config/lyrebird/config.toml
-rw-r--r-- 1 root root 238 Aug 13 12:46 /home/littles/.config/lyrebird/config.toml
Seems like its 544 as root:root? I assume that is a mistake?

ModuleNotFoundError: No module named 'lyrebird.mainwindow'

I just downloaded V1.0.1, when I try to launch it, I get this:

Traceback (most recent call last):
  File "/usr/local/bin/lyrebird/app.py", line 5, in <module>
    import lyrebird.mainwindow as mainwindow
ModuleNotFoundError: No module named 'lyrebird.mainwindow'

Lemme know what other details you need.

python problem

tried usin the debian install but it wasn't working, so i tried the .tar.gz install, but it's showin pthon problems
image
it was originally on the default 2.7, but i found a way to change it, even then it ain't workin. i'm using zorin os 15.3

All my null sinks disappeared.

Every time I turn lyrebird on, all my null sinks disappear and my loopback devices that were using those null sinks get set to use the wrong sinks.

No Input Detected via Lyrebird Virtual Input

OS: Pop!_OS 20.04 LTS (Ubuntu derivative)

Issue: When switching from my default audio input device to the Lyrebird Virtual Input, no applications can detect any audio. I have tried this with multiple programs, including Audacity, Discord, and OBS Studio.

us3r@workstation:~/Desktop/lyrebird-1.1.0$ ./install.sh 
[lyrebird] Installing Lyrebird to prefix: /home/us3r/.local
[lyrebird] Installing Python modules: toml
Requirement already satisfied: toml in /usr/lib/python3/dist-packages (0.10.0)

[lyrebird] Copying app/ to: /home/us3r/.local/share/lyrebird
[lyrebird] Copying icon.png to: /home/us3r/.local/share/lyrebird
[lyrebird] Copying app.py to: /home/us3r/.local/share/lyrebird
[lyrebird] Copying lyrebird to: /home/us3r/.local/bin
[lyrebird] Setting permissions 755 recursively for: /home/us3r/.local/share/lyrebird

[lyrebird] Copying lyrebird.desktop to: /home/us3r/.local/share/applications
[lyrebird] Setting permission 644 for: /home/us3r/.local/share/applications/lyrebird.desktop

[lyrebird] Installed Lyrebird v1.1
us3r@workstation:~/Desktop/lyrebird-1.1.0$ lyrebird 
Module module-null-sink not loaded.
Module module-remap-source not loaded.
Loaded null output sink (0), and remap sink (0)

I have verified that I have the correct prerequisites installed as listed in the ReadMe, and I have tried both the .deb package and the .sh script installations with both having the same result.

Missing implicit dependency gi

While attempting to package lyrebird for kiss, I have come across the problem that gi is missing. After some search it apparently can be installed from the pygobject package provided there.

Wouldn't it be wise to explicitly state it as a dependency?

Deb/PPA packaging/repo?

Any chance we can get releases with deb packaging, and/or a PPA/repo?

I really avoid software that my package manager is unaware of like the plague, so if you would be so kind as to expand your build and release process to deb packaging at a minimum, or go beyond that into running a PPA/repo, that would be very much appreciated! And I'm sure by far more than just me. :)

Kubuntu 20.04 - bad .desktop

The environment variables are not set by default, causing the application not to launch. Also, just having the category "audio" does not add it to the multimedia category, and instead places it into "lost and found". Below is a working config for me.

Encoding=UTF-8
Version=1.0
Type=Application
Name=Lyrebird
GenericName=Voice Changer
Icon=/usr/share/lyrebird/icon.png
Exec=/usr/bin/lyrebird
Path=/usr/share/
Terminal=false
Categories=AudioVideo;Audio;

Use pkg-config to set cflags

Today CFLAGS var on Makefile is hardcoded:
CFLAGS = -g -Wall -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -D_REENTRANT
However, in my system, my glib-2.0 includes are in /usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include.

pkg-config --libs glib-2.0 can resolve this issue.

Blindly pkilling sox is a bad idea

Blindly pkilling sox is a bad idea. Especially since it's possible that a user could have multiple instances of sox running, and when he/she closes Lyrebird then all of the other instances of sox get killed too. An alternative would be to look into terminating the subprocess properly

No module named 'gi'

I'm on Linux Mint 20,
everything was ok, but when i tried to open lyrebird I got:
raceback (most recent call last):
File "/usr/share/lyrebird/app.py", line 2, in
import gi
ModuleNotFoundError: No module named 'gi'

python --version is 3.8.5
Any ideas what may be the problem?

Migrate to using librosa and librubberband for formant shifting

Migrate to using librosa and librubberband for formant shifting. This would make the male and most importantly female voices, much more accurate and allow even more vocal flexibility in the future, since we could easily implement phaser effects and vocoders using librosa later on when we have the groundwork for a low-level streaming solution, rather than relying on sox.

I've played around, and it seems to be possible to use librubberband from Python and read data from a wave file (called bad.wav), apply a pitch shift effect with formant shifting and write it to "good.wav".

import soundfile as sf
import pyrubberband as pyrb

y, sr = sf.read('/home/char/bad.wav')
shifted = pyrb.pitch_shift(y, sr, n_steps=2.4)
sf.write('good.wav', shifted, sr)

The code to achieve this for a wave file is above, however in order to make this realtime we will need to do something like the following.

  1. Read from the microphone input, and stream into a buffer/numpy array(?)
  2. Process the buffer whenever new data is added to it, and apply the pitch shift effect
  3. Write this new buffer out to a Pulse null output, like before in sox only this time writing the numpy array
    instead of piping directly from sox

Compatibility with PipeWire

PipeWire is a new Linux multimedia framework aimed at replacing PulseAudio, Jack, with Alsa compatibility. I provides integration with existing applications with compatible libraries and protocol.
The pacmd is however PulseAudio-only and isn't available on some distributions as it's delivered with the PulseAudio package which conflicts with PipeWire.
Could the dependency to pacmd be dropped or an alternative be found? for instance, direct calls to the PulseAudio library/daemon?

Traceback (most recent call last):
  File "/usr/share/lyrebird/app.py", line 13, in <module>
    win = mainwindow.MainWindow()
  File "/usr/share/lyrebird/app/mainwindow.py", line 62, in __init__
    utils.unload_pa_modules(check_state=False)
  File "/usr/share/lyrebird/app/core/utils.py", line 60, in unload_pa_modules
    subprocess.call('pacmd unload-module module-null-sink'.split(" "))
  File "/usr/lib/python3.9/subprocess.py", line 349, in call
    with Popen(*popenargs, **kwargs) as p:
  File "/usr/lib/python3.9/subprocess.py", line 947, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.9/subprocess.py", line 1819, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'pacmd'

Linux mint (Cinnamon): error when trying to run the app.py

After a normal install, app.py in usr/local/bin/lyrebird gives this error when trying to run with python3

Traceback (most recent call last):
  File "app.py", line 5, in <module>
    import lyrebird.mainwindow as mainwindow
ModuleNotFoundError: No module named 'lyrebird.mainwindow'

.desktop file doesn't open

After running the lyrebird.desktop file, it just closes the window immediately. I don't really know what really happened. Anything that could help with it?

I've modified the install.sh file as after running sudo bash install.sh, I get an error saying it should be Python 3.7 or higher, since my python3 is python3.5 so I changed the python3 to python3.8

Any help would be appreciated!

Can't launch it

Sounds fun, but unfortunately I can't try.

./install.sh

/usr/local/share/applications/ didn't exist before, just created it

Installing required pip3 modules

Defaulting to user installation because normal site-packages is not writeable

Requirement already satisfied: toml in /home/seifer/.local/lib/python3.6/site-packages (0.10.1)

Installed Lyrebird to /usr/local/bin/lyrebird/

Installed Lyrebird.desktop to /usr/local/share/applications/

Lyrebird does is in my applications list, but nothing happens when I click on it. Any idea?

Load config from /etc by default

It'd be nice to try loading the needed config files from /etc/lyrebird and then override them by ~/.config/lyrebird if they exist there.

I wanted to throw it on AUR but this is making it hard.

Failed to install in Ubuntu 20.04 LTS

Failed to install in Ubuntu 20.04 LTS
log details

$ sudo dpkg -i lyrebird_1.1.0-1.deb
(Reading database ... 439479 files and directories currently installed.)
Preparing to unpack lyrebird_1.1.0-1.deb ...
Unpacking lyrebird (1.1.0-1) over (1.1.0-1) ...
dpkg: dependency problems prevent configuration of lyrebird:
 lyrebird depends on python3-toml; however:
  Package python3-toml is not installed.
 lyrebird depends on python-gobject; however:
  Package python-gobject is not installed.
 lyrebird depends on libsox-fmt-pulse; however:
  Package libsox-fmt-pulse is not installed.

dpkg: error processing package lyrebird (--install):
 dependency problems - leaving unconfigured
Processing triggers for bamfdaemon (0.5.3+18.04.20180207.2-0ubuntu2) ...
Rebuilding /usr/share/applications/bamf-2.index...
Processing triggers for gnome-menus (3.36.0-1ubuntu1) ...
Processing triggers for desktop-file-utils (0.24-1ubuntu3) ...
Processing triggers for mime-support (3.64ubuntu1) ...
Errors were encountered while processing:
 lyrebird
$ 

2 second delay of output

it's working fine, but there's a 2 second delay for the output for me, which makes it fairly impractical for daily use. is there a way to lower this delay at the cost of processing power/sampling rate?

support for pipewire?

please add support for pipewire or pipewire-pulse so fedora users can also change voices

Propose rewrite in C using librubberband and pulse/simple.h

While researching into methods to perform formant shifting in Python, it has come to my attention that this may not be possible without having significant latency, or writing a libpulse wrapper. I am proposing the idea that we begin a rewrite of v1.2/v1.3/[insert current version number] of Lyrebird purely in C. This would mean no Python interpretor required, faster startup times, less latency (since we would directly be using PulseAudio) and would most important allow us direct and unrestricted access to PulseAudio under the hood.

Alternatively, we could write a ctypes wrapper over everything or even go so far as to write a Python extension in C, but I'm proposing a rewrite for the reasons above. If we were to go through with the rewrite, it will be done in a parallel branch to master.

I've attached some below links to documentation about the PulseAudio library for C.
https://gavv.github.io/articles/pulseaudio-under-the-hood/
https://acassis.wordpress.com/2012/10/04/reading-microphone-audio-using-pulseaudio-simple/

Raspberry Pi

Can you please port this to Raspberry Pi? There are no voice changers for Raspberry Pi and I would love to use this tool on my Pi.
Also Lyrebird does not create a virtual input device. I am using normal Raspberry Pi OS.

Have proper distro packages available

Having an install script is eh and means you have to manually update.

Having an AUR package along with a Ubuntu package available (ppa for ubuntu) would make it more accessible and that should satisfy the majority of mainstream distro users.

Do not use /etc for config files

Strongly suggest using a proper directory e.g. $HOME/.config/lyrebird for the config files.

Using /etc this way is not desirable nor complying with XDG Base Dir spec.

Can't choose Lyrebird

I can't choose Lyrebird from pavucontrol. Only shows Remapped <Name i set Lyrebird to listen to>, no Lyrebird Input.

Don't allow for two instances of Lyrebird to be open

Lyrebird creates a pulseaudio sink and source with fixed name. Opening two instances of the program makes them compete for the same resources and basically everything breaks.

There should be some check if Lyrebird is already open, and maybe show a warning to the user in case it is.

ERROR

When I run the file that it tells me to run in my terminal it says this:

SyntaxError: invalid syntax
fakeblob@penguin:~/lyrebird$ python3 install.sh
  File "install.sh", line 7
    VERBOSE=${VERBOSE:-1}
            ^
SyntaxError: invalid syntax
fakeblob@penguin:~/lyrebird$ 

This is what I did to run the file:

python3 install.sh

i did that in my terminal please help.

cant run the app

can we have a more verbose requirements list like is this python 2 or 3? what modules are needed?

no module named dataclasses

after an attempted install, all dependencies were double checked to be installed.

lafont@lafont-G3-3579:~/Desktop/lyrebird-master$ ./Lyrebird.desktop
./Lyrebird.desktop: line 1: [Desktop: command not found
./Lyrebird.desktop: line 6: Changer: command not found
Traceback (most recent call last):
File "/usr/local/bin/lyrebird/app.py", line 5, in
import lyrebird.mainwindow as mainwindow
File "/usr/local/bin/lyrebird/lyrebird/mainwindow.py", line 10, in
import lyrebird.core.presets as presets
File "/usr/local/bin/lyrebird/lyrebird/core/presets.py", line 4, in
import lyrebird.core.config as config
File "/usr/local/bin/lyrebird/lyrebird/core/config.py", line 3, in
from dataclasses import dataclass
ModuleNotFoundError: No module named 'dataclasses'

The input device won't register

So, I chose a pre-set and toggled the record button

app

I am using PulseAudio Volume Control and not able to select the Lyrebird Input Device

input

In the system settings as well, the input does show but nothing gets recorded. You can see no amplification in there.

input

Also, I am not sure where the output is supposed to come but I am pretty sure it should be on the system itself if only the input device was able to record something. FYI: I chose Speakers Built in Audio for the output.

Linux Mint: Failed to open file 'icon.png': No such file or directory (4)

jd@Marzipan:$ python3.7 /usr/local/bin/lyrebird/app.py
Module module-null-sink not loaded.
Module module-remap-source not loaded.
Traceback (most recent call last):
File "/usr/local/bin/lyrebird/app.py", line 18, in
win = mainwindow.MainWindow()
File "/usr/local/bin/lyrebird/lyrebird/mainwindow.py", line 54, in init
self.set_icon_from_file('icon.png')
GLib.Error: g-file-error-quark: Failed to open file 'icon.png': No such file or directory (4)
jd@Marzipan:$

Sox issue

Followed all installation instructions and ended up with

sox FAIL formats: can't open output file `Lyrebird-Output': can not open audio device: No such entity
Loaded null output sink (0), and remap sink (0)
sox WARN pitch: pitch clipped 9124 samples; decrease volume?
sox WARN rate: rate clipped 16448 samples; decrease volume?
Loaded null output sink (0), and remap sink (0)
sox WARN pitch: pitch clipped 3156 samples; decrease volume?
sox WARN rate: rate clipped 5610 samples; decrease volume?
sox FAIL formats: can't open output file `Lyrebird-Output': can not open audio device: No such entity
sox FAIL formats: can't open output file `Lyrebird-Output': can not open audio device: No such entity

Using python 3.7.9 on Ubuntu 18.04

Feature Suggestions

Although it seems like development has stopped / paused at least for now, here are some features, many of them found in clownfish, that I think would be useful to make lyrebird even more complete:

  1. Sound player - so you could choose a local sound file to play through the virtual mic, and, preferably, lyrebird should be able to remember which files were added and store them in an accessible list.

  2. System sound player - one use case for having system sound play through virtual mic that I recently ran into was watching a movie together with some friends. Things like discord and zoom only do 30 fps free screen sharing, but I could use obs to play a movie through a virtual camera; however, audio would be missing. I realize I could use pulse to change the sound input to system sound instead of my mic, but then I couldn't talk with anyone while watching. So I think it would be great if there could be a toggle to add system sound to mic output while the physical mic still works.

  3. A music player like the one in clownfish

Again, I would love to see these features implemented at some point, but lyrebird is already a great project, and I'll definitely use it over any other voice changers. :)

[Feature Request] SoundBox with personal shortcut

[Feature Request] SoundBox with personal shortcut.
Loading a audio file and playing it other Mic and Speakers by a shortcut.
I will take a look to create a pull request.

C'est bizare de charger les pactl dans le main_widow et le décharger par utils non ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.