{"id":18470025,"url":"https://github.com/greyhatguy007/speech-proj","last_synced_at":"2025-05-12T01:45:52.807Z","repository":{"id":203539297,"uuid":"709840685","full_name":"greyhatguy007/speech-proj","owner":"greyhatguy007","description":null,"archived":false,"fork":false,"pushed_at":"2023-11-01T18:18:55.000Z","size":4162,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-10T23:29:41.521Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/greyhatguy007.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-10-25T13:58:27.000Z","updated_at":"2024-01-25T10:35:11.000Z","dependencies_parsed_at":null,"dependency_job_id":"67a7f599-b347-4ee9-8ed0-43fd23347d9a","html_url":"https://github.com/greyhatguy007/speech-proj","commit_stats":null,"previous_names":["greyhatguy007/speech-proj"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/greyhatguy007%2Fspeech-proj","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/greyhatguy007%2Fspeech-proj/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/greyhatguy007%2Fspeech-proj/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/greyhatguy007%2Fspeech-proj/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/greyhatguy007","download_url":"https://codeload.github.com/greyhatguy007/speech-proj/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253497296,"owners_count":21917683,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-11-06T10:12:47.450Z","updated_at":"2025-05-10T23:29:44.261Z","avatar_url":"https://github.com/greyhatguy007.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Speech Recognition Application with PyQt\n\nThis Python application allows you to convert audio files, particularly MP3 files, to WAV format and then transcribe the WAV files to text using Google's Speech Recognition service. It provides a user-friendly graphical interface built with PyQt5.\n\n## Features\n\n- Import audio files in MP3 format.\n- Convert MP3 files to WAV format.\n- Perform automatic speech recognition on the audio content.\n- Display the recognized text in the application's user interface.\n\n\n## Speech Recognition Model\n\nThis speech recognition application leverages Google's advanced speech recognition model, which combines the power of Hidden Markov Models (HMMs) and Deep Neural Networks (DNNs) for which the backbone is **Long Short Term Memory (LSTM)** networks.\n\n### Hidden Markov Models (HMMs)\n\nHidden Markov Models are a statistical model used in various speech recognition systems. They are particularly effective in modeling the acoustic properties of speech, making them an essential component in many automatic speech recognition (ASR) systems.\n\n\u003ccenter\u003e\n \n![HMM](/public/HMM.png)  \n *overview of HMM*  \n \u003c/center\u003e  \n\n### Deep Neural Networks (DNNs)\n\nDeep Neural Networks have revolutionized the field of speech recognition in recent years. They are known for their ability to capture complex patterns and dependencies in audio data. DNNs are used to refine the results obtained from HMMs, resulting in more accurate transcription of spoken language.\n\nThis hybrid approach, which combines the strengths of HMMs and DNNs, allows the model to deliver high-quality speech recognition and transcription.\n\n\u003ccenter\u003e\n \n![HMM](/public/DNN.png)  \n *overview of DNN*  \n \u003c/center\u003e  \n \n### Long Short-Term Memory (LSTM) Networks\n\nLSTM networks are a type of recurrent neural network (RNN) that excel in capturing long-range dependencies in sequential data, such as speech. The inclusion of LSTM networks in the model enhances its ability to understand and transcribe spoken language.\n\nThis hybrid approach, combining HMMs, DNNs, and LSTMs, allows the model to deliver high-quality speech recognition and transcription, making it suitable for a wide range of applications.\n\n\nA simple code to generate a LSTM model using pytorch is as follows  \n\n```python\nimport torch\nimport torch.nn as nn\n\nclass SpeechRecognitionModel(nn.Module):\n    def __init__(self, input_size, hidden_size, num_layers, num_classes):\n        super(SpeechRecognitionModel, self).__init()\n        self.lstm = nn.LSTM(input_size, hidden_size, num_layers, batch_first=True, bidirectional=True)\n        self.fc = nn.Linear(hidden_size * 2, num_classes)\n\n    def forward(self, x):\n        out, _ = self.lstm(x)\n        # out: (batch_size, sequence_length, hidden_size*2)\n        out = self.fc(out[:, -1, :])  # Last time step output\n        return out\n\n\n#hyperparameters\ninput_size = 13  # Input features (MFCC coefficients)\nhidden_size = 256\nnum_layers = 3\nnum_classes = 29  # Number of classes (phonemes)\n\n# Model Instance\nmodel = SpeechRecognitionModel(input_size, hidden_size, num_layers, num_classes)\n\n# Loss and optimizer\ncriterion = nn.CrossEntropyLoss()\noptimizer = torch.optim.Adam(model.parameters(), lr=0.001)\n```\n**Recurrent Neural Networks (RNNs)** serve as the foundation for **Long Short-Term Memory (LSTM) networks**. LSTMs are a specialized type of RNN designed to address the vanishing gradient problem often encountered in standard RNNs. They are distinguished by their ability to capture long-range dependencies in sequential data, thanks to memory cells and gating mechanisms. These components control the flow of information, allowing LSTMs to retain and update information over extended sequences. LSTMs are particularly effective for tasks like speech recognition, natural language processing, and time series analysis, where preserving long-term context is crucial for accurate predictions and understanding temporal relationships.\n\n\u003ccenter\u003e\n \n![HMM](/public/RNN.png)  \n *overview of RNN*  \n \u003c/center\u003e \n\n## Prerequisites For the Application\n\n- Python 3.x\n- PyQt5\n- PyDub\n- SpeechRecognition\n\nInstall the required packages using the following command:\n\nTo run the code\n*optional steps - create a virtual environment*\n\n```bash\ngit clone\n\npython -m venv venv\n\nsource venv/bin/activate\n\npip install -r requirements.txt\n\npython main.py\n```\n\n## Usage\n\n1. Run the application by executing main.py.\n2. Click the \"Import Audio File\" button to select an MP3 audio file for conversion and transcription.\n3. The application will convert the audio to WAV format and transcribe the content using Google's Speech Recognition service.\n4. The recognized text will be displayed in the result area.\n\n## Application Interface\n\n\u003ccenter\u003e\n \n![Interface 1](/public/SS1.png)\n *Initiating venv and running the Program* \n\n \u003c/center\u003e \n\n\u003ccenter\u003e\n \n![Interface 2](/public/SS2.png)\n *Model Anayzing Imported audio file* \n\n \u003c/center\u003e \n\n\u003ccenter\u003e\n \n![Interface 3](/public/SS3.png)\n *Result Displayed* \n\n \u003c/center\u003e \n \n\n### [Application Functioning](./public/demo.mkv)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgreyhatguy007%2Fspeech-proj","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgreyhatguy007%2Fspeech-proj","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgreyhatguy007%2Fspeech-proj/lists"}