I know there is a way to improve the script using libraries like pydub but I didn't want to depend on pydub to do that.
Maybe I'll update sometime
to get the seconds of a song just multiply the minute value by 60, example: 4 minutes = 240 seconds in audio_legth
- Sends OGG audio voice feature files directly from your computer to a Discord channel
- Does not require a smartphone
- It is also possible to reply to messages with voice, just edit the "message_reference"
- Python 3.x
- requests module
- Clone or download the repository.
- Install the requests module using the following command in your terminal or command prompt:
pip install requests
- Use the file named token.txt in the same directory as the script and paste your Discord token in it.
- Modify the filename to the audio name what do you want to send;
- Set the channel_id variable to the ID of the Discord channel where you want to send the audio file;
- Set the audio_length variable to the length of the audio file in seconds.
- Run the script using the following command in your terminal or command prompt:
python audio_sender.py
- This script was tested on Windows 10 and Python 3.9.5.
- Make sure that you have the permissions to send messages and files in the channel specified by the channel_id variable.
- The waveform key in the json_data variable is a fake wave and can be edited if desired.
- C#: https://github.com/Reiko69420/Discord-Mobile-Audio-Sender-Windows (From Reiko)