![]() This transcribed text is added in case comment.Īs we have access token from first lightning component into custom metadata. This component will take case id and generate transcribed text from any attached audio file on specific record. Let us create another lightning component. Url of this tab should be added in step 3 of prerequisites. This class will be called from class GoogleAuthService.Ĭreate a tab for this lightning component so that it will be accessible easily. Add class MetadataService to update access token value. Create custom metadata to store access token for later userĬreate one custom metadata type named GoogleAuthSetting and add field AccessToken in it. It will use above mentioned GoogleAuthService class to generate token.Ĭ. GoogleAuthComponent component is created for getting access token. Create Lightning component to get access token This token will be saved in custom metadata for further use. GetAccessToken: This apex method will generate access token. This url will generate token after you authenticate using google credential created in step #1.ĬreateAuthURL – This apex method will create authentication redirect url. Create Apex class to generate URL for getting access tokenĬreate apex class GoogleAuthService to get authentication url. Create custom metadata to store access token for later user.Ī.Create lightning component to get access token.Create Apex class to generate URL for getting access token.Below steps will be used to get access token Let us Authenticate Salesforce App and get access token from Google authentication service. Get Access Token from Google Authentication Service ![]() Second Lightning Component to get Transcription from Speech APIġ.First Lightning Component to get Access Token from Google Authentication Service.We need to set redirect url which will be lighting component url for authenticating and getting access token.Īs mentioned above, to get transcription from audio we have to create two lightning components. Use Lightning url of your org without https. Authorize domain in OAuth Consent Screen.Create project in Google Cloud and enable Cloud Speech-to-Text API at.One component will get access token from Google authorization service and second component will use this access token to generate text from audio file. To make this requirement achievable, we have to create two lightning component. As a requirement, we need to convert attached audio file and add that to case comment in same record. This audio file is attached in case record. This post is using Google Speech API to transcribe audio file into text. There are many solutions available for converting audio/video file to text. We can check how agents are discussing with customers. Once we get text from audio files, we can review those conversions. These audios were majorly from customer calls with agents. Recently we were having a requirement for getting text from audio or video file.
0 Comments
Leave a Reply. |