diff --git a/voice_to_text/README.rst b/voice_to_text/README.rst new file mode 100644 index 000000000..e18182579 --- /dev/null +++ b/voice_to_text/README.rst @@ -0,0 +1,53 @@ +.. image:: https://img.shields.io/badge/licence-LGPL--3-blue.svg + :target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html + :alt: License: LGPL-3 + +Voice To Text +========================== +Voice To Text In Systray , Text Fields And Shortcut Keyboard + +Installation +============ + - www.odoo.com/documentation/16.0/setup/install.html + - Install our custom addon + +Configuration +============= + - Select the fastest methode in the res.config.settings + - Install speech_recognition 3.9.9 using the command : + pip install SpeechRecognition + +Company +------- +* `Cybrosys Techno Solutions `__ + +License +------- +General Public License, Version 3 (LGPL v3). +(https://www.odoo.com/documentation/user/16.0/legal/licenses/licenses.html) + +Credits +------- +* Developer: V16 Gayathri @ Cybrosys + +Contacts +-------- +* Mail Contact : odoo@cybrosys.com +* Website : https://cybrosys.com + +Bug Tracker +----------- +Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. + +Maintainer +========== +.. image:: https://cybrosys.com/images/logo.png + :target: https://cybrosys.com + +This module is maintained by Cybrosys Technologies. + +For support and more information, please visit `Our Website `__ + +Further information +=================== +HTML Description: ``__ \ No newline at end of file diff --git a/voice_to_text/__init__.py b/voice_to_text/__init__.py new file mode 100644 index 000000000..ae675eb7e --- /dev/null +++ b/voice_to_text/__init__.py @@ -0,0 +1,23 @@ +"""Voice to text""" +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +from . import models diff --git a/voice_to_text/__manifest__.py b/voice_to_text/__manifest__.py new file mode 100644 index 000000000..3349a6ef6 --- /dev/null +++ b/voice_to_text/__manifest__.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +{ + 'name': 'Voice To Text', + 'version': '16.0.1.0.0', + 'category': 'Extra Tools', + 'summary': 'Record voice in odoo.', + 'description': 'Record voice in odoo command palette search bar and the ' + 'text fields ,it converts the voice into text.', + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': 'https://www.cybrosys.com', + 'images': ['static/description/banner.png'], + 'license': 'LGPL-3', + 'installable': True, + 'auto_install': False, + 'application': False, + 'depends': ['base', 'web', 'sale'], + 'data': [ + 'security/ir.model.access.csv', + 'views/res_config_setting_views.xml', + ], + 'assets': { + 'web.assets_backend': [ + 'voice_to_text/static/src/xml/voice_search.xml', + 'voice_to_text/static/src/xml/voice_search_bar.xml', + 'voice_to_text/static/src/xml/text_field.xml', + "voice_to_text/static/src/js/command_palette.js", + 'voice_to_text/static/src/js/search_bar_voice.js', + 'voice_to_text/static/src/js/text_field.js', + ], + }, + 'external_dependencies': { + 'python': ['speech_recognition'] + }, +} diff --git a/voice_to_text/doc/RELEASE_NOTES.md b/voice_to_text/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..ad0936eea --- /dev/null +++ b/voice_to_text/doc/RELEASE_NOTES.md @@ -0,0 +1,7 @@ +## Module + +#### 08.08.2023 +#### Version 16.0.1.0.0 +#### ADD + +- Initial Commit for - Voice To Text diff --git a/voice_to_text/models/__init__.py b/voice_to_text/models/__init__.py new file mode 100644 index 000000000..aa7960db7 --- /dev/null +++ b/voice_to_text/models/__init__.py @@ -0,0 +1,24 @@ +"""Voice to text conversion""" +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +from . import res_config_settings +from . import voice_recognition diff --git a/voice_to_text/models/res_config_settings.py b/voice_to_text/models/res_config_settings.py new file mode 100644 index 000000000..f1154f95f --- /dev/null +++ b/voice_to_text/models/res_config_settings.py @@ -0,0 +1,33 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +from odoo import fields, models + + +class ResConfigSettings(models.TransientModel): + """Used to add new fields and sets and gets the value for that fields""" + _inherit = 'res.config.settings' + + select_fastest_methode = fields.Selection( + [('chrome', 'Google Chrome(Fastest Way)'), + ('all_browser', 'All Browser(May occur buffering)')], + string="Select the Method", help="The fastest method", + config_parameter='voice_to_text.select_fastest_method') diff --git a/voice_to_text/models/voice_recognition.py b/voice_to_text/models/voice_recognition.py new file mode 100644 index 000000000..bd1fdfc49 --- /dev/null +++ b/voice_to_text/models/voice_recognition.py @@ -0,0 +1,64 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +import speech_recognition as sr +from odoo import models, _ + + +class VoiceRecognition(models.Model): + """This class is used holds the voice recognition""" + _name = 'voice.recognition' + _description = 'Voice recognition' + + def get_the_browser(self): + """Used to retrieve the browser/fastest method tht the user choose.""" + methode_browser = self.env['ir.config_parameter'].sudo().get_param( + 'voice_to_text.select_fastest_methode') + return methode_browser + + def recognize_speech(self): + """This is used to recognizes the voice""" + r = sr.Recognizer() + with sr.Microphone() as source: + audio_data = r.record(source, duration=15) + try: + text = r.recognize_google(audio_data, language='en-US') + return text + except sr.UnknownValueError: + return 0 + + def update_field(self, field, model, script, id): + """This is used to write the voice text into the field""" + if script: + self.env[model].write({ + field: script + }) + else: + script = self.recognize_speech() + if script: + model = self.env[model].browse(id) + model.sudo().write({ + field: script + }) + else: + raise ValueError(_( + 'Your Voice is not recognized Please try again')) + return True diff --git a/voice_to_text/security/ir.model.access.csv b/voice_to_text/security/ir.model.access.csv new file mode 100644 index 000000000..d52d5a6f7 --- /dev/null +++ b/voice_to_text/security/ir.model.access.csv @@ -0,0 +1,2 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_voice_recognition,access.voice.recognition,model_voice_recognition,base.group_user,1,1,1,1 diff --git a/voice_to_text/static/description/assets/icons/check.png b/voice_to_text/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/voice_to_text/static/description/assets/icons/check.png differ diff --git a/voice_to_text/static/description/assets/icons/chevron.png b/voice_to_text/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/voice_to_text/static/description/assets/icons/chevron.png differ diff --git a/voice_to_text/static/description/assets/icons/cogs.png b/voice_to_text/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/voice_to_text/static/description/assets/icons/cogs.png differ diff --git a/voice_to_text/static/description/assets/icons/consultation.png b/voice_to_text/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/voice_to_text/static/description/assets/icons/consultation.png differ diff --git a/voice_to_text/static/description/assets/icons/ecom-black.png b/voice_to_text/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/voice_to_text/static/description/assets/icons/ecom-black.png differ diff --git a/voice_to_text/static/description/assets/icons/education-black.png b/voice_to_text/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/voice_to_text/static/description/assets/icons/education-black.png differ diff --git a/voice_to_text/static/description/assets/icons/hotel-black.png b/voice_to_text/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/voice_to_text/static/description/assets/icons/hotel-black.png differ diff --git a/voice_to_text/static/description/assets/icons/license.png b/voice_to_text/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/voice_to_text/static/description/assets/icons/license.png differ diff --git a/voice_to_text/static/description/assets/icons/lifebuoy.png b/voice_to_text/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/voice_to_text/static/description/assets/icons/lifebuoy.png differ diff --git a/voice_to_text/static/description/assets/icons/logo.png b/voice_to_text/static/description/assets/icons/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/voice_to_text/static/description/assets/icons/logo.png differ diff --git a/voice_to_text/static/description/assets/icons/manufacturing-black.png b/voice_to_text/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/voice_to_text/static/description/assets/icons/manufacturing-black.png differ diff --git a/voice_to_text/static/description/assets/icons/pos-black.png b/voice_to_text/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/voice_to_text/static/description/assets/icons/pos-black.png differ diff --git a/voice_to_text/static/description/assets/icons/puzzle.png b/voice_to_text/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/voice_to_text/static/description/assets/icons/puzzle.png differ diff --git a/voice_to_text/static/description/assets/icons/restaurant-black.png b/voice_to_text/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/voice_to_text/static/description/assets/icons/restaurant-black.png differ diff --git a/voice_to_text/static/description/assets/icons/service-black.png b/voice_to_text/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/voice_to_text/static/description/assets/icons/service-black.png differ diff --git a/voice_to_text/static/description/assets/icons/trading-black.png b/voice_to_text/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/voice_to_text/static/description/assets/icons/trading-black.png differ diff --git a/voice_to_text/static/description/assets/icons/training.png b/voice_to_text/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/voice_to_text/static/description/assets/icons/training.png differ diff --git a/voice_to_text/static/description/assets/icons/update.png b/voice_to_text/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/voice_to_text/static/description/assets/icons/update.png differ diff --git a/voice_to_text/static/description/assets/icons/user.png b/voice_to_text/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/voice_to_text/static/description/assets/icons/user.png differ diff --git a/voice_to_text/static/description/assets/icons/wrench.png b/voice_to_text/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/voice_to_text/static/description/assets/icons/wrench.png differ diff --git a/voice_to_text/static/description/assets/misc/categories.png b/voice_to_text/static/description/assets/misc/categories.png new file mode 100644 index 000000000..bedf1e0b1 Binary files /dev/null and b/voice_to_text/static/description/assets/misc/categories.png differ diff --git a/voice_to_text/static/description/assets/misc/check-box.png b/voice_to_text/static/description/assets/misc/check-box.png new file mode 100644 index 000000000..42caf24b9 Binary files /dev/null and b/voice_to_text/static/description/assets/misc/check-box.png differ diff --git a/voice_to_text/static/description/assets/misc/compass.png b/voice_to_text/static/description/assets/misc/compass.png new file mode 100644 index 000000000..d5fed8faa Binary files /dev/null and b/voice_to_text/static/description/assets/misc/compass.png differ diff --git a/voice_to_text/static/description/assets/misc/corporate.png b/voice_to_text/static/description/assets/misc/corporate.png new file mode 100644 index 000000000..2eb13edbf Binary files /dev/null and b/voice_to_text/static/description/assets/misc/corporate.png differ diff --git a/voice_to_text/static/description/assets/misc/customer-support.png b/voice_to_text/static/description/assets/misc/customer-support.png new file mode 100644 index 000000000..79efc72ed Binary files /dev/null and b/voice_to_text/static/description/assets/misc/customer-support.png differ diff --git a/voice_to_text/static/description/assets/misc/cybrosys-logo.png b/voice_to_text/static/description/assets/misc/cybrosys-logo.png new file mode 100644 index 000000000..cc3cc0ccf Binary files /dev/null and b/voice_to_text/static/description/assets/misc/cybrosys-logo.png differ diff --git a/voice_to_text/static/description/assets/misc/features.png b/voice_to_text/static/description/assets/misc/features.png new file mode 100644 index 000000000..b41769f77 Binary files /dev/null and b/voice_to_text/static/description/assets/misc/features.png differ diff --git a/voice_to_text/static/description/assets/misc/logo.png b/voice_to_text/static/description/assets/misc/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/voice_to_text/static/description/assets/misc/logo.png differ diff --git a/voice_to_text/static/description/assets/misc/pictures.png b/voice_to_text/static/description/assets/misc/pictures.png new file mode 100644 index 000000000..56d255fe9 Binary files /dev/null and b/voice_to_text/static/description/assets/misc/pictures.png differ diff --git a/voice_to_text/static/description/assets/misc/pie-chart.png b/voice_to_text/static/description/assets/misc/pie-chart.png new file mode 100644 index 000000000..426e05244 Binary files /dev/null and b/voice_to_text/static/description/assets/misc/pie-chart.png differ diff --git a/voice_to_text/static/description/assets/misc/right-arrow.png b/voice_to_text/static/description/assets/misc/right-arrow.png new file mode 100644 index 000000000..730984a06 Binary files /dev/null and b/voice_to_text/static/description/assets/misc/right-arrow.png differ diff --git a/voice_to_text/static/description/assets/misc/star.png b/voice_to_text/static/description/assets/misc/star.png new file mode 100644 index 000000000..2eb9ab29f Binary files /dev/null and b/voice_to_text/static/description/assets/misc/star.png differ diff --git a/voice_to_text/static/description/assets/misc/support.png b/voice_to_text/static/description/assets/misc/support.png new file mode 100644 index 000000000..4f18b8b82 Binary files /dev/null and b/voice_to_text/static/description/assets/misc/support.png differ diff --git a/voice_to_text/static/description/assets/misc/whatsapp.png b/voice_to_text/static/description/assets/misc/whatsapp.png new file mode 100644 index 000000000..d513a5356 Binary files /dev/null and b/voice_to_text/static/description/assets/misc/whatsapp.png differ diff --git a/voice_to_text/static/description/assets/modules/5.gif b/voice_to_text/static/description/assets/modules/5.gif new file mode 100644 index 000000000..8f40aab85 Binary files /dev/null and b/voice_to_text/static/description/assets/modules/5.gif differ diff --git a/voice_to_text/static/description/assets/modules/barcode.png b/voice_to_text/static/description/assets/modules/barcode.png new file mode 100644 index 000000000..618e3e6c4 Binary files /dev/null and b/voice_to_text/static/description/assets/modules/barcode.png differ diff --git a/voice_to_text/static/description/assets/modules/fatoorah.png b/voice_to_text/static/description/assets/modules/fatoorah.png new file mode 100644 index 000000000..991fc77ec Binary files /dev/null and b/voice_to_text/static/description/assets/modules/fatoorah.png differ diff --git a/voice_to_text/static/description/assets/modules/integration_biometric.png b/voice_to_text/static/description/assets/modules/integration_biometric.png new file mode 100644 index 000000000..ed11bd818 Binary files /dev/null and b/voice_to_text/static/description/assets/modules/integration_biometric.png differ diff --git a/voice_to_text/static/description/assets/modules/product_brand.png b/voice_to_text/static/description/assets/modules/product_brand.png new file mode 100644 index 000000000..1d2238b80 Binary files /dev/null and b/voice_to_text/static/description/assets/modules/product_brand.png differ diff --git a/voice_to_text/static/description/assets/modules/website_cart.png b/voice_to_text/static/description/assets/modules/website_cart.png new file mode 100644 index 000000000..163485cfd Binary files /dev/null and b/voice_to_text/static/description/assets/modules/website_cart.png differ diff --git a/voice_to_text/static/description/assets/screenshots/hero.gif b/voice_to_text/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..f624d89eb Binary files /dev/null and b/voice_to_text/static/description/assets/screenshots/hero.gif differ diff --git a/voice_to_text/static/description/assets/screenshots/image1.png b/voice_to_text/static/description/assets/screenshots/image1.png new file mode 100644 index 000000000..9b93309cc Binary files /dev/null and b/voice_to_text/static/description/assets/screenshots/image1.png differ diff --git a/voice_to_text/static/description/assets/screenshots/image2.png b/voice_to_text/static/description/assets/screenshots/image2.png new file mode 100644 index 000000000..311fb0606 Binary files /dev/null and b/voice_to_text/static/description/assets/screenshots/image2.png differ diff --git a/voice_to_text/static/description/assets/screenshots/image3.png b/voice_to_text/static/description/assets/screenshots/image3.png new file mode 100644 index 000000000..125400169 Binary files /dev/null and b/voice_to_text/static/description/assets/screenshots/image3.png differ diff --git a/voice_to_text/static/description/assets/screenshots/image4.png b/voice_to_text/static/description/assets/screenshots/image4.png new file mode 100644 index 000000000..6c2788b5d Binary files /dev/null and b/voice_to_text/static/description/assets/screenshots/image4.png differ diff --git a/voice_to_text/static/description/assets/screenshots/image5.png b/voice_to_text/static/description/assets/screenshots/image5.png new file mode 100644 index 000000000..0eaaf588a Binary files /dev/null and b/voice_to_text/static/description/assets/screenshots/image5.png differ diff --git a/voice_to_text/static/description/assets/screenshots/image6.png b/voice_to_text/static/description/assets/screenshots/image6.png new file mode 100644 index 000000000..6f02a2ea6 Binary files /dev/null and b/voice_to_text/static/description/assets/screenshots/image6.png differ diff --git a/voice_to_text/static/description/assets/screenshots/image7.png b/voice_to_text/static/description/assets/screenshots/image7.png new file mode 100644 index 000000000..547f7e7e9 Binary files /dev/null and b/voice_to_text/static/description/assets/screenshots/image7.png differ diff --git a/voice_to_text/static/description/banner.png b/voice_to_text/static/description/banner.png new file mode 100644 index 000000000..cba3c2461 Binary files /dev/null and b/voice_to_text/static/description/banner.png differ diff --git a/voice_to_text/static/description/icon.png b/voice_to_text/static/description/icon.png new file mode 100644 index 000000000..b9f385e08 Binary files /dev/null and b/voice_to_text/static/description/icon.png differ diff --git a/voice_to_text/static/description/images/arrows-transparent.png b/voice_to_text/static/description/images/arrows-transparent.png new file mode 100644 index 000000000..f2973bb02 Binary files /dev/null and b/voice_to_text/static/description/images/arrows-transparent.png differ diff --git a/voice_to_text/static/description/images/cybro_logo.png b/voice_to_text/static/description/images/cybro_logo.png new file mode 100644 index 000000000..bb309114c Binary files /dev/null and b/voice_to_text/static/description/images/cybro_logo.png differ diff --git a/voice_to_text/static/description/images/icons/ecom.png b/voice_to_text/static/description/images/icons/ecom.png new file mode 100644 index 000000000..6e720d50e Binary files /dev/null and b/voice_to_text/static/description/images/icons/ecom.png differ diff --git a/voice_to_text/static/description/images/icons/education.png b/voice_to_text/static/description/images/icons/education.png new file mode 100644 index 000000000..f0de98eb0 Binary files /dev/null and b/voice_to_text/static/description/images/icons/education.png differ diff --git a/voice_to_text/static/description/images/icons/hotel.png b/voice_to_text/static/description/images/icons/hotel.png new file mode 100644 index 000000000..917c6a63e Binary files /dev/null and b/voice_to_text/static/description/images/icons/hotel.png differ diff --git a/voice_to_text/static/description/images/icons/manufacturing.png b/voice_to_text/static/description/images/icons/manufacturing.png new file mode 100644 index 000000000..68c3722f8 Binary files /dev/null and b/voice_to_text/static/description/images/icons/manufacturing.png differ diff --git a/voice_to_text/static/description/images/icons/pos.png b/voice_to_text/static/description/images/icons/pos.png new file mode 100644 index 000000000..600bfe4f9 Binary files /dev/null and b/voice_to_text/static/description/images/icons/pos.png differ diff --git a/voice_to_text/static/description/images/icons/restaurant.png b/voice_to_text/static/description/images/icons/restaurant.png new file mode 100644 index 000000000..680acf29e Binary files /dev/null and b/voice_to_text/static/description/images/icons/restaurant.png differ diff --git a/voice_to_text/static/description/images/icons/service.png b/voice_to_text/static/description/images/icons/service.png new file mode 100644 index 000000000..bfbe7a6d2 Binary files /dev/null and b/voice_to_text/static/description/images/icons/service.png differ diff --git a/voice_to_text/static/description/images/icons/trading.png b/voice_to_text/static/description/images/icons/trading.png new file mode 100644 index 000000000..a741219b5 Binary files /dev/null and b/voice_to_text/static/description/images/icons/trading.png differ diff --git a/voice_to_text/static/description/index.html b/voice_to_text/static/description/index.html new file mode 100644 index 000000000..8f1ed2671 --- /dev/null +++ b/voice_to_text/static/description/index.html @@ -0,0 +1,562 @@ +
+ +
+ +
+
+ Community +
+
+ Enterprise +
+
+ Odoo.sh +
+
+
+ + + +

Voice to Text

+

The module is used to convert the voice to text.

+ + + +
+ + +
+
+ +
+

Explore This + Module

+
+ + + +
+
+ +
+

COnfiguration +

+
+
+
+ Install python package speech_recognition 3.9.9 +
+
+ + +
+
+ +
+

Overview +

+
+
+
+ The app is used to convert voice into text in the text fields,search bars and also in the shortcut keyboard. +
+
+ + + +
+
+ +
+

Features +

+
+
+
+
+ + + Conversion of voice to text. +
+
+ + Conversion in Text fields,Shortcut keyboards and Search bar. +
+
+
+ + + +
+
+ +
+

Screenshots +

+
+
+
+ +
+

Choose the methode or browser you want to use.

+

+ +
+ +
+

Mic option in the text field.

+ +
+ +
+

After press the button and start recording.

+

After recording

+ +
+ +
+

Mic the shortcut keyboard also.

+ +
+ +
+

After recording

+ +
+ +
+

Mic in the search bar.

+ +
+
+

Record the sound by clicking the mic and press the enter key .

+ +
+ + +
+
+ + + +
+
+ +
+

Related + Products +

+
+
+
+ +
+
+ + + + +
+
+ +
+

Our Services +

+
+ +
+
+
+
+ +
+
+ Odoo + Customization
+
+ +
+
+ +
+
+ Odoo + Implementation
+
+ +
+
+ +
+
+ Odoo + Support
+
+ + +
+
+ +
+
+ Hire + Odoo + Developer
+
+ +
+
+ +
+
+ Odoo + Integration
+
+ +
+
+ +
+
+ Odoo + Migration
+
+ + +
+
+ +
+
+ Odoo + Consultancy
+
+ +
+
+ +
+
+ Odoo + Implementation
+
+ +
+
+ +
+
+ Odoo + Licensing Consultancy
+
+
+ +
+ + + + + +
+
+ +
+

Our + Industries +

+
+ +
+
+
+
+ +
+ Trading +
+

+ Easily procure + and + sell your products

+
+
+ +
+
+ +
+ POS +
+

+ Easy + configuration + and convivial experience

+
+
+ +
+
+ +
+ Education +
+

+ A platform for + educational management

+
+
+ +
+
+ +
+ Manufacturing +
+

+ Plan, track and + schedule your operations

+
+
+ +
+
+ +
+ E-commerce & Website +
+

+ Mobile + friendly, + awe-inspiring product pages

+
+
+ +
+
+ +
+ Service Management +
+

+ Keep track of + services and invoice

+
+
+ +
+
+ +
+ Restaurant +
+

+ Run your bar or + restaurant methodically

+
+
+ +
+
+ +
+ Hotel Management +
+

+ An + all-inclusive + hotel management application

+
+
+
+
+ + + + +
+
+ +
+

Support +

+
+
+
+
+
+
+ +
+
+

Need Help?

+

Got questions or need help? Get in touch.

+ +

+ odoo@cybrosys.com

+
+
+
+
+
+
+
+ +
+
+

WhatsApp

+

Say hi to us on WhatsApp!

+ +

+91 86068 + 27707

+
+
+
+
+
+
+
+ +
+
+
+ \ No newline at end of file diff --git a/voice_to_text/static/src/css/voice_recognition.css b/voice_to_text/static/src/css/voice_recognition.css new file mode 100644 index 000000000..df54c5a1d --- /dev/null +++ b/voice_to_text/static/src/css/voice_recognition.css @@ -0,0 +1,80 @@ +/* The Modal (background) */ +.modal { + display: none; /* Hidden by default */ + position: fixed; /* Stay in place */ + z-index: 1; /* Sit on top */ + left: 0; + top: 0; + width: 100%; /* Full width */ + height: 100%; /* Full height */ + overflow: auto; /* Enable scroll if needed */ + background-color: rgb(0,0,0); /* Fallback color */ + background-color: rgba(0,0,0,0.4); /* Black w/ opacity */ + -webkit-animation-name: fadeIn; /* Fade in the background */ + -webkit-animation-duration: 0.4s; + animation-name: fadeIn; + animation-duration: 0.4s +} + + +/* Modal Content */ +.modal-content { + position: fixed; + bottom: 0; + background-color: #fefefe; + width: 100%; + -webkit-animation-name: slideIn; + -webkit-animation-duration: 0.4s; + animation-name: slideIn; + animation-duration: 0.4s +} + +/* The Close Button */ +.close { + color: white; + float: right; + font-size: 28px; + font-weight: bold; +} + +.close:hover, +.close:focus { + color: #000; + text-decoration: none; + cursor: pointer; +} + +.modal-header { + padding: 2px 16px; + background-color: #5cb85c; + color: white; +} + +.modal-body {padding: 2px 16px;} + +.modal-footer { + padding: 2px 16px; + background-color: #5cb85c; + color: white; +} + +/* Add Animation */ +@-webkit-keyframes slideIn { + from {right: -300px; opacity: 0} + to {right: 0; opacity: 1} +} + +@keyframes slideIn { + from {right: -300px; opacity: 0} + to {right: 0; opacity: 1} +} + +@-webkit-keyframes fadeIn { + from {opacity: 0} + to {opacity: 1} +} + +@keyframes fadeIn { + from {opacity: 0} + to {opacity: 1} +} \ No newline at end of file diff --git a/voice_to_text/static/src/js/command_palette.js b/voice_to_text/static/src/js/command_palette.js new file mode 100644 index 000000000..f6c00df44 --- /dev/null +++ b/voice_to_text/static/src/js/command_palette.js @@ -0,0 +1,25 @@ +/** @odoo-module **/ +import { CommandPalette } from "@web/core/commands/command_palette"; +import { patch } from "@web/core/utils/patch"; +import rpc from 'web.rpc'; +patch(CommandPalette.prototype, '@web/core/commands/command_palette', { + setup() { + this._super.apply(); + }, + //This function is used to recognize the voice + async recordVoice(event) { + if (location.href.includes('http:')){ + var response = await rpc.query({ + model: 'voice.recognition', + method: 'recognize_speech', + args: [,], + }) + if (response){ + this.state.searchValue = response + } + else{ + this.state.searchValue = "Your voice could not be recognizing......" + } + } + }, +}) \ No newline at end of file diff --git a/voice_to_text/static/src/js/search_bar_voice.js b/voice_to_text/static/src/js/search_bar_voice.js new file mode 100644 index 000000000..d481ac2a9 --- /dev/null +++ b/voice_to_text/static/src/js/search_bar_voice.js @@ -0,0 +1,45 @@ +/** @odoo-module **/ + +import { SearchBar } from "@web/search/search_bar/search_bar"; +import { patch } from "@web/core/utils/patch"; +import rpc from 'web.rpc'; +var microphone = false +patch(SearchBar.prototype, '@web/search/search_bar/search_bar', { + setup() { + this._super(...arguments); + }, + //This function is used to recognize the voice in the search bar + async recordVoiceBar(event) { + this.microphone = true + if (location.href.includes('http:')){ + var response = await rpc.query({ + model: 'voice.recognition', + method: 'recognize_speech', + args: [,], + }) + if (response){ + this.response = response + } + else{ + this.response= "False" + var w_response = confirm("can't recognize try again....") + } + } + }, + onSearchInput(ev) { + if (this.microphone == true){ + if(this.response != "False"){ + ev.target.value = this.response; + } + else{ + ev.target.value = "Your Voice can't recognize please try again."; + } + } + const query = ev.target.value + if (query.trim()) { + this.computeState({ query, expanded: [], focusedIndex: 0, subItems: [] }); + } else if (this.items.length) { + this.resetState(); + } + } +}) diff --git a/voice_to_text/static/src/js/text_field.js b/voice_to_text/static/src/js/text_field.js new file mode 100644 index 000000000..631a2ed11 --- /dev/null +++ b/voice_to_text/static/src/js/text_field.js @@ -0,0 +1,66 @@ +/** @odoo-module **/ + +import { TextField } from "@web/views/fields/text/text_field"; +import { patch } from "@web/core/utils/patch"; +import rpc from 'web.rpc'; +patch(TextField.prototype,'@web/views/fields/text/text_field',{ + setup() { + this._super.apply(); + }, + // This function is used to recognize voice on the text fields + async recordText(ev){ + var self = this + var browser = await rpc.query({ + model: 'voice.recognition', + method: 'get_the_browser', + args: [,], + }).then(function (data) { + if (data =='chrome'){ + let final_transcript = ""; + if ("webkitSpeechRecognition" in window) { + let speechRecognition = new webkitSpeechRecognition(); + if(speechRecognition){ + speechRecognition.continuous = true; + navigator.mediaDevices.getUserMedia({ + audio: true}).then( + speechRecognition.start()) + speechRecognition.onresult = (e) => { + for (let i = e.resultIndex; i < e.results.length; ++i) { + if (e.results[i].isFinal) { + final_transcript += e.results[i][0].transcript; + } else { + interim_consttranscript += event.results[i][0].transcript; + } + } + if(final_transcript){ + var field = this.__owl__.bdom.parentEl.attributes.name.nodeValue + var model = this.props.record.resModel + var browser = rpc.query({ + model: 'voice.recognition', + method: 'update_field', + args: [,field,model,final_transcript], + }) + + } + + } + } + } + } + else if(data=='all_browser') { + var field = self.__owl__.bdom.parentEl.attributes.name.nodeValue + var model = self.props.record.resModel + var id = self.env.model.__bm_load_params__.res_id + var browser = rpc.query({ + model: 'voice.recognition', + method: 'update_field', + args: [,field,model,false,id], + }) + } + }) + + } +}) + + + diff --git a/voice_to_text/static/src/xml/text_field.xml b/voice_to_text/static/src/xml/text_field.xml new file mode 100644 index 000000000..f1ed94299 --- /dev/null +++ b/voice_to_text/static/src/xml/text_field.xml @@ -0,0 +1,16 @@ + + \ No newline at end of file diff --git a/voice_to_text/static/src/xml/voice_search.xml b/voice_to_text/static/src/xml/voice_search.xml new file mode 100644 index 000000000..3efefc9d3 --- /dev/null +++ b/voice_to_text/static/src/xml/voice_search.xml @@ -0,0 +1,16 @@ + + + diff --git a/voice_to_text/static/src/xml/voice_search_bar.xml b/voice_to_text/static/src/xml/voice_search_bar.xml new file mode 100644 index 000000000..a9cf0f870 --- /dev/null +++ b/voice_to_text/static/src/xml/voice_search_bar.xml @@ -0,0 +1,15 @@ + + \ No newline at end of file diff --git a/voice_to_text/views/res_config_setting_views.xml b/voice_to_text/views/res_config_setting_views.xml new file mode 100644 index 000000000..ba0f86562 --- /dev/null +++ b/voice_to_text/views/res_config_setting_views.xml @@ -0,0 +1,35 @@ + + + + + res.config.settings.view.form.inherit.voice.text + + res.config.settings + + + +
+

Speech to Text

+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file