Coder Social home page Coder Social logo

sunosongscreator's Introduction

SunoSongsCreator

About High quality songs generation by https://www.suno.ai/. Reverse engineered API.

How to

  • Login to https://app.suno.ai/ and generate some songs.
  • Use Chrome or other browsers to inspect the network requests (F12 -> XHR).
  • Clone this REPO -> git clone https://github.com/yihong0618/SunoSongsCreator.git
  • XHR find cookie in this url -> https://clerk.suno.ai/v1/client?_clerk_js_version=4.70.5
  • Copy the cookie.
  • You can import the cookie using export SUNO_COOKIE='<your-suno-cookie>' or rename .env.example to .env and fill in SUNO_COOKIE.

Usage

python -m suno --prompt 'a big red dream song'

or

pip install -U suno_songs
from suno import SongsGen
i = SongsGen('cookie') # Replace 'cookie'
print(i.get_limit_left())
i.save_songs("a blue cyber dream song", './output')

Custom mode

#you can use custom mode
from suno import SongsGen
i = SongsGen('cookie') # Replace 'cookie'
print(i.get_limit_left())
i.save_songs("大江东去,浪淘尽,千古风流人物。故垒西边,人道是、三国周郎赤壁。乱石穿空,惊涛拍岸,卷起千堆雪。江山如画,一时多少豪杰。遥想公瑾当年,小乔初嫁了,雄姿英发。", is_custom=True, title="custom", tags="轻松的R&B, BPM60, 小调, 电吉他、贝斯、键盘和轻鼓, 男性歌手") 

Get song library

from suno import SongsGen
i = SongsGen('cookie') # Replace 'cookie'
print(i.get_song_library())

Thanks

sunosongscreator's People

Contributors

yihong0618 avatar idkwhatimd0ing avatar wengchaoxi avatar andy963 avatar

Stargazers

Sezgin YILDIRIM avatar Asfar Sadewa avatar  avatar Artem avatar Sultan Arapov avatar SuperSkidder avatar K8sCat avatar Đại avatar Merrick Zhang avatar  avatar miesword avatar Matuco19 avatar hycinth avatar Shiokiri avatar  avatar ZhiQiang Wu avatar Liu Wenyuan avatar Daniel He avatar  avatar  avatar  avatar  avatar Adi Satrio avatar puy avatar  avatar Aiden avatar  avatar  avatar  avatar Ice-Hazymoon avatar WQQDuan avatar  avatar itsandyd avatar 张志诚 avatar  avatar  avatar Chen Chen avatar halfzm avatar GoJun avatar Logan avatar allen.hu avatar  avatar  avatar maskx avatar dabpluo avatar  avatar  avatar  avatar  avatar  avatar Latin avatar  avatar  avatar iSte94 avatar Matt An avatar  avatar 玩牛牛 avatar Cyclotomic Fields avatar Esus2_A avatar  avatar  avatar Milora avatar HongCheng avatar sansiny avatar Miku avatar wen avatar  avatar qiandy avatar Zetao Feng avatar C05M1C avatar chzz avatar Barış Yıldırım avatar Tadas Gedgaudas avatar Simo Chen avatar Som Nek avatar  avatar 李俊 avatar WirrorYin avatar  avatar 杜育轩 avatar Toan Tran avatar 赖嘉伟Gary avatar Tyrion Lannister avatar ludo avatar  avatar César Morad avatar Andy8787(布長) avatar  avatar Raoni Meira Gabriel avatar  avatar liyifan avatar  avatar someu avatar Kellyxiaowei avatar  avatar hyhnet avatar ConanYu avatar Chen Xiang‘An avatar godotg avatar Mukil Chittybabu avatar

Watchers

Nativeas avatar  avatar  avatar  avatar

sunosongscreator's Issues

希望增加读取已生成歌单列表

由于一次请求花费时间很长,很容易程序中断,造成生成的歌曲难以找回,所以希望能够增加读取生成的歌单列表便于找回

如何使用instrumental 按钮

当我使用
{
"prompt": "",
"mv": "chirp-v3-0",
"title": "hello world",
"tags": "Pop, folk, easy listening, anime, blues, country, classical"
}'
这样的超参数,但还是会生成带有歌词的歌曲,是要再加什么参数嘛,使用F12看接口的时候,没看到相应的接口参数,希望能得到帮助

Amazing idea

This is great! But a real good way would be if it's possible to generate random songs depending on the amount credit available.
This way you can generate idea's on a daily base and later on scroll through them to see what's good and what's not.

would this be hard to do?

Error Response - 401 [Unauthorized]

{"detail": "Unauthorized"} Error response <Response [401]> {"detail": "Unauthorized"} Error response <Response [401]> Ignoring exception in command generate: Traceback (most recent call last): File "/home/container/main.py", line 53, in generate sg1.save_songs(prompt, "./output", make_instrumental=instrumental, is_custom=False) File "/home/container/.local/lib/python3.12/site-packages/suno/suno.py", line 287, in save_songs self.get_songs( File "/home/container/.local/lib/python3.12/site-packages/suno/suno.py", line 228, in get_songs raise Exception(f"Error response {str(response)}") Exception: Error response <Response [401]> During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/container/.local/lib/python3.12/site-packages/discord/commands/core.py", line 131, in wrapped ret = await coro(arg) ^^^^^^^^^^^^^^^ File "/home/container/.local/lib/python3.12/site-packages/discord/commands/core.py", line 1013, in _invoke await self.callback(ctx, **kwargs) File "/home/container/main.py", line 55, in generate sg2.save_songs(prompt, "./output", make_instrumental=instrumental, is_custom=False) File "/home/container/.local/lib/python3.12/site-packages/suno/suno.py", line 287, in save_songs self.get_songs( File "/home/container/.local/lib/python3.12/site-packages/suno/suno.py", line 228, in get_songs raise Exception(f"Error response {str(response)}") Exception: Error response <Response [401]>

The code was working till last week, but it stopped working when I tried it a couple days ago, and I got the same error when I tried it again today. Any help would be appreciated! I have rechecked that the cookie is correct and updated it again, and I'm not getting an error for that as I got before I updated it, so I know that's not the problem, so I can't figure out what it is

[BUG] About music file downloading

I managed to generate songs through your work, which is a great one, but the generated link seems to be useless for downloading. The downloaded file is corruptted, and has only zero btyes.
image

Exception: Failed to get session id

Hi, thank you for this project. It was working perfectly for me until last night when I started getting the following error every time I run my program:

  File "/home/user/Development/suno-bot/SunoSongsCreator/suno/suno.py", line 46, in __init__
    auth_token = self._get_auth_token()
                 ^^^^^^^^^^^^^^^^^^^^^^
  File "/home/user/Development/suno-bot/SunoSongsCreator/suno/suno.py", line 56, in _get_auth_token
    raise Exception("Failed to get session id")
Exception: Failed to get session id

The error triggers when I try initializing your project with this line: SongsGen(cookie).
I have tested it with multiple accounts which I have confirmed work when using the web version.

If you have any insight on why this might be happening, I would very much appreciate it. Thank you again for this project.

HELP

i read all of the steps and follow all the instruction but still i dont get it how to get the token ?

please make video how to do it. im new

Failed to get session id

%2C%22%24initial_referrer%22%3A%20%22%24direct%22%2C%22%24initial_referring_domain%22%3A%20%22%24direct%22%7D') # Replace 'cookie'
File "noSongsCreator-main/suno/suno.py", line 39, in init
auth_token = self._get_auth_token()
File "/Users/slamjeck/Downloads/SunoSongsCreator-main/suno/suno.py", line 53, in _get_auth_token
raise Exception("Failed to get session id")
Exception: Failed to get session id

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.