{"id":19350633,"url":"https://github.com/slevin48/ami","last_synced_at":"2026-05-05T18:32:03.170Z","repository":{"id":208354682,"uuid":"717859806","full_name":"slevin48/ami","owner":"slevin48","description":"Artificial Market Intelligence App 🤖","archived":false,"fork":false,"pushed_at":"2024-05-09T01:00:17.000Z","size":45596,"stargazers_count":0,"open_issues_count":6,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-24T10:25:46.228Z","etag":null,"topics":["openai","streamlit"],"latest_commit_sha":null,"homepage":"https://conseil-dami.streamlit.app/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/slevin48.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-11-12T20:21:45.000Z","updated_at":"2024-05-09T01:00:20.000Z","dependencies_parsed_at":"2024-05-09T02:34:13.289Z","dependency_job_id":null,"html_url":"https://github.com/slevin48/ami","commit_stats":null,"previous_names":["slevin48/ami"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/slevin48/ami","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slevin48%2Fami","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slevin48%2Fami/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slevin48%2Fami/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slevin48%2Fami/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/slevin48","download_url":"https://codeload.github.com/slevin48/ami/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slevin48%2Fami/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32662900,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-05T11:29:49.557Z","status":"ssl_error","status_checked_at":"2026-05-05T11:29:48.587Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["openai","streamlit"],"created_at":"2024-11-10T04:33:20.286Z","updated_at":"2026-05-05T18:32:03.152Z","avatar_url":"https://github.com/slevin48.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Artificial Market Intelligence 🤖\r\n\r\nhttps://github.com/slevin48/ami/assets/12418115/6d12b2dd-b349-48be-bdf9-4efafae4e0bf\r\n\r\n## Summary\r\n\r\n```python\r\ndef summarize(text):\r\n    inst = '''Resume l'article suivant en moins de 1000 caracteres:''' \r\n    completion = openai.chat.completions.create(\r\n        model='gpt-3.5-turbo-1106',\r\n        messages= [\r\n            {'role': 'system', 'content': inst },\r\n            {'role': 'user', 'content': text }]\r\n    )\r\n    return completion.choices[0].message.content\r\n\r\n```\r\n\r\n## Text to Speech\r\n\r\n```python\r\ndef text_to_speech(text, voice='fable'):\r\n    speech_file_path = Path(f'podcast/{episode}/audio/' + article.replace('.txt', '.mp3'))\r\n    response = openai.audio.speech.create(\r\n    model=\"tts-1\",\r\n    voice=voice,\r\n    input=summary\r\n    )\r\n    response.stream_to_file(speech_file_path)\r\n    return response.result\r\n```\r\n\r\n## Translation\r\n\r\n[translate_log.txt](translate_log.txt) contains the log of the translation process:\r\n```\r\nIteration 0: Les embauches de cadres marquent le pas mais résistent toujours.txt\r\nTranslation characters: 459\r\nTranslated title: The hiring of executives is slowing down but still holding steady.\r\nVoice: alloy\r\nAudio file saved to podcast\\episode003\\audio_en\\The hiring of executives is slowing down but still holding steady..mp3\r\nIteration 1: Nikki Haley joue sa carte dans la primaire républicaine.txt\r\nTranslation characters: 629\r\nTranslated title: Nikki Haley is playing her hand in the Republican primary.\r\nVoice: echo\r\nAudio file saved to podcast\\episode003\\audio_en\\Nikki Haley is playing her hand in the Republican primary..mp3\r\nIteration 2: Nucléaire - les petits réacteurs essuient un revers aux Etats-Unis.txt\r\nTranslation characters: 465\r\nTranslated title: Nuclear - small reactors suffer a setback in the United States\r\nVoice: fable\r\nAudio file saved to podcast\\episode003\\audio_en\\Nuclear - small reactors suffer a setback in the United States.mp3\r\nIteration 3: Présidentielle américaine 2024 - Donald Trump fait la course en tête.txt\r\nTranslation characters: 509\r\nTranslated title: 2024 American Presidential Election - Donald Trump in the lead\r\nVoice: onyx\r\nAudio file saved to podcast\\episode003\\audio_en\\2024 American Presidential Election - Donald Trump in the lead.mp3\r\nIteration 4: Trump II - le même en pire.txt\r\nTranslation characters: 525\r\nTranslated title: Trump II - the same but worse\r\nVoice: nova\r\nAudio file saved to podcast\\episode003\\audio_en\\Trump II - the same but worse.mp3\r\nIteration 5: « Je suis devenu président grâce à ma marque », se vante Trump à son procès.txt\r\nTranslation characters: 488\r\nTranslated title: I became president because of my brand, boasts Trump at his trial.\r\nVoice: shimmer\r\nAudio file saved to podcast\\episode003\\audio_en\\I became president because of my brand, boasts Trump at his trial..mp3\r\n```\r\n\r\n## Inspiration\r\n\r\nhttps://github.com/slevin48/echos-TTS\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fslevin48%2Fami","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fslevin48%2Fami","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fslevin48%2Fami/lists"}