Discussions

Ask a Question
Back to All

create a stream talk

If you create the stitch as false, the quality and color of the video will not look like the attached image, the moment you make the stitch as true, the video will become blurry and the colors will look strange.


{  
    const playResponse = await fetchWithRetries(`${DID_API.url}/${DID_API.service}/streams/${streamId}`, {  
      method: 'POST',  
      headers: {  
        Authorization: `Basic ${DID_API.key}`,  
        'Content-Type': 'application/json',  
      },  
      body: JSON.stringify({  
        script: {  
          type: 'text',  
          provider: {  
            type: 'microsoft',  
            voice_id: 'en-US-JennyNeural',  
            voice_config: {rate: '1.0', pitch: 'medium'},  
            language: 'English (United States)'  
          },    
          input : "this is example."  
        },  
        config: {  
          // align_expand_factor: 0,  
          stitch: true,  
          // align_driver: true,  
          // auto_math: true,  
          // normalization_factor: 1,  
          // sharpen: true,  
          // result_format: "mp4",  
          // fluent: true,  
          // pad_audio: 0  
        },  
        // audio_optimization: 2,  
        session_id: sessionId,  
      }),  
    });  
  }