lyrebird-voice-changer / lyrebird Goto Github PK
View Code? Open in Web Editor NEW🦜 Simple and powerful voice changer for Linux, written with Python & GTK
License: MIT License
🦜 Simple and powerful voice changer for Linux, written with Python & GTK
License: MIT License
this is a nice project. thank you for creating it. the discord invite link needs to be replaced.
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?
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?
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.
I wanna make shortcuts to change the voice to a specific one.
I also wanna make a shortcut to set the voice to normal.
After installing the application and ensuring the requirements are installed as well, setting the input device as "Lyrebird virtual input" won't pick up any sound from the mic.
If it helps, I'm using the HyperX Quadcast and Pop!_OS 20.04.
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.
"python-gobject" is not installable...
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.
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?
I wanna create a custom voice.
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. :)
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;
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.
I don't get any output from Lyrebird. I do when i change the Audacity input to my mic.
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
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. 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.
numpy
array(?)sox
only this time writing the numpy
arraysox
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'
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'
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!
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?
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
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
$
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?
please add support for pipewire or pipewire-pulse so fedora users can also change voices
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/
Dependency requirements should show that python 3.7 is required, as well as toml, and _gi
_gi has to be linked by doing this:
https://github.com/aben20807/blog-post/issues/80
I wanna set for example,that discord uses the voice changed input,but obs the normal microphone.
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.
How to use an external mic for voice input to lyrebird instead of default laptop mic?
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.
I've selected the voice changer in the voice recorders and yet I can still hear my voice when playing it back.
Pop!_OS 20.04 is my OS
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.
I can't choose Lyrebird from pavucontrol. Only shows Remapped <Name i set Lyrebird to listen to>
, no Lyrebird Input
.
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.
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.
can we have a more verbose requirements list like is this python 2 or 3? what modules are needed?
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'
So, I chose a pre-set and toggled the record button
I am using PulseAudio Volume Control and not able to select the Lyrebird Input Device
In the system settings as well, the input does show but nothing gets recorded. You can see no amplification in there.
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.
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:$
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
When I run install.sh i get "install.sh: line 31: pip3: command not found" installed all dependcies I could besides the libsox-fmt since I couldn't find the Arch equivalent. Any 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:
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.
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.
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.
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 ?
Discussed with @chxrlt and it seems a better option than including all current files in /usr/bin
. Would also allow launching from terminal.
Things like gain control or frequency options or reverb etc.
With that you could make more voices that are cooler and you could make a earrape voice.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.