abstract method “com.google.api.gax.tracing.ApiTracer” error from TextToSpeechApi, how to solve it?How to save an Android Activity state using save instance state?How do I center text horizontally and vertically in a TextView?Why is the Android emulator so slow? How can we speed up the Android emulator?Stop EditText from gaining focus at Activity startup'Must Override a Superclass Method' Errors after importing a project into Eclipse“Debug certificate expired” error in Eclipse Android pluginsHow can I open a URL in Android's web browser from my application?How do I fix android.os.NetworkOnMainThreadException?Unfortunately MyApp has stopped. How can I solve this?'5000 characters limit exceeded' Using SSML vs. Text Input: Google Text-to-Speech (TTS)

Necroskitter and creatures dying because of placing -1/-1 counters

Why won't some unicode characters print to my terminal?

Is it possible to have two words with the same particle in a sentence?

Did 007 exist before James Bond?

How to belay quickly ascending top-rope climbers?

Everyone but three

Upgrade magento 2.3.1 to 2.3.2

Is straight-up writing someone's opinions telling?

Why a binary file is not shown as 0 and 1?

How to tell the object type of an Attachment

Why does a tetrahedral molecule like methane have a dipole moment of zero?

Why did Fury respond that way?

Pauli exclusion principle - black holes

What happens if a company buys back all of its shares?

Amira L'Akum not on Shabbat

When designing an adventure, how can I ensure a continuous player experience in a setting that's likely to favor TPKs?

Locked-up DOS computer beeped on keypress. What mechanism caused that?

Which GPUs to get for Mathematical Optimization (if any)?

Arithmetics in LuaLaTeX

Should I have shared a document with a former employee?

Not able to find the "TcmTemplateDebugHost" process in Attach process, Even we run the Template builder

What was the difference between a Games Console and a Home Computer?

How to interpret a promising preprint that was never published?

Term “console” in game consoles



abstract method “com.google.api.gax.tracing.ApiTracer” error from TextToSpeechApi, how to solve it?


How to save an Android Activity state using save instance state?How do I center text horizontally and vertically in a TextView?Why is the Android emulator so slow? How can we speed up the Android emulator?Stop EditText from gaining focus at Activity startup'Must Override a Superclass Method' Errors after importing a project into Eclipse“Debug certificate expired” error in Eclipse Android pluginsHow can I open a URL in Android's web browser from my application?How do I fix android.os.NetworkOnMainThreadException?Unfortunately MyApp has stopped. How can I solve this?'5000 characters limit exceeded' Using SSML vs. Text Input: Google Text-to-Speech (TTS)






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








1















i am using TextToSpeechApi for read the text with multiple language & voices.
But it show java.lang.AbstractMethodError: error on SynthesizeSpeechResponse
line. How to solve this.



My gradle :



dependencies 
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'

implementation 'com.google.cloud:google-cloud-translate:1.65.0'
// add these dependencies for the speech client
implementation 'io.grpc:grpc-okhttp:1.10.0'
implementation 'com.google.cloud:google-cloud-speech:0.53.0-alpha'
implementation 'com.google.cloud:google-cloud-texttospeech:0.53.0-beta'

implementation 'com.android.support:cardview-v7:28.0.0'
implementation 'com.android.support:design:28.0.0'
implementation 'com.android.support:recyclerview-v7:28.0.0'



My Java Coding:



public class TextReadCloudApi extends AppCompatActivity 

private static final String TAG = "TextReadCloudApi";
private TextToSpeechClient textToSpeechClient;

@Override
protected void onCreate(@Nullable Bundle savedInstanceState)
super.onCreate(savedInstanceState);
setContentView(R.layout.text_read_api);

Button button = (Button) findViewById(R.id.readBtn);

button.setOnClickListener(new View.OnClickListener()
@Override
public void onClick(View v)
Speak();

);


private void Speak()
try
final InputStream stream = getResources().openRawResource(R.raw.transcribeapi);
ServiceAccountCredentials credentials = ServiceAccountCredentials.fromStream(stream);
TextToSpeechSettings settings = TextToSpeechSettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(credentials)).build();
this.textToSpeechClient = TextToSpeechClient.create(settings);
SetUp();
catch (IOException e)
e.printStackTrace();



@SuppressLint("StaticFieldLeak")
private void SetUp()

new AsyncTask<Void, Void, Void>()
@Override
protected Void doInBackground(Void... params)
// Set the text input to be synthesized
SynthesisInput input = SynthesisInput.newBuilder()
.setText("Hello, World!")
.build();

// Build the voice request, select the language code ("en-US") and the ssml voice gender
// ("neutral")
VoiceSelectionParams voice = VoiceSelectionParams.newBuilder()
.setLanguageCode("en")
.setSsmlGender(SsmlVoiceGender.FEMALE)
.build();


// Select the type of audio file you want returned
AudioConfig audioConfig = AudioConfig.newBuilder()
.setAudioEncoding(AudioEncoding.MP3)
.build();

SynthesizeSpeechRequest speechRequest=SynthesizeSpeechRequest.newBuilder()
.setVoice(voice)
.setAudioConfig(audioConfig)
.setInput(input)
.build();

// Perform the text-to-speech request on the text input with the selected voice parameters and
// audio file type
if(!textToSpeechClient.isShutdown())
SynthesizeSpeechResponse response=textToSpeechClient.synthesizeSpeech(speechRequest);
// SynthesizeSpeechResponse response=textToSpeechClient.synthesizeSpeechCallable().call(speechRequest);
// SynthesizeSpeechResponse response = textToSpeechClient.synthesizeSpeech(input, voice, audioConfig);

// Get the audio contents from the response
ByteString audioContents = response.getAudioContent();

// Write the response to the output file.
try
OutputStream out = new FileOutputStream("output.mp3");
out.write(audioContents.toByteArray());
System.out.println("Audio content written to file "output.mp3"");
Log.d(TAG, "SetUp: Audio content written to file");
catch (Exception e)
e.printStackTrace();


return null;

.execute();





Error :



 Caused by: java.lang.AbstractMethodError: abstract method "com.google.api.gax.tracing.ApiTracer com.google.api.gax.rpc.ApiCallContext.getTracer()"
at com.google.api.gax.retrying.BasicRetryingFuture.handleAttempt(BasicRetryingFuture.java:141)
at com.google.api.gax.retrying.CallbackChainRetryingFuture$AttemptCompletionListener.handle(CallbackChainRetryingFuture.java:135)
at com.google.api.gax.retrying.CallbackChainRetryingFuture$AttemptCompletionListener.run(CallbackChainRetryingFuture.java:117)
at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:398)
at com.google.common.util.concurrent.AbstractFuture.executeListener(AbstractFuture.java:1030)
at com.google.common.util.concurrent.AbstractFuture.addListener(AbstractFuture.java:675)
at com.google.common.util.concurrent.AbstractFuture$TrustedFuture.addListener(AbstractFuture.java:105)
at com.google.common.util.concurrent.ForwardingListenableFuture.addListener(ForwardingListenableFuture.java:45)
at com.google.api.gax.retrying.CallbackChainRetryingFuture.setAttemptFuture(CallbackChainRetryingFuture.java:93)
at com.google.api.gax.rpc.AttemptCallable.call(AttemptCallable.java:89)
at com.google.api.gax.rpc.RetryingCallable.futureCall(RetryingCallable.java:63)
at com.google.api.gax.rpc.RetryingCallable.futureCall(RetryingCallable.java:41)
at com.google.api.gax.rpc.UnaryCallable$1.futureCall(UnaryCallable.java:126)
at com.google.api.gax.rpc.UnaryCallable.futureCall(UnaryCallable.java:87)
at com.google.api.gax.rpc.UnaryCallable.call(UnaryCallable.java:112)
at com.google.cloud.texttospeech.v1.TextToSpeechClient.synthesizeSpeech(TextToSpeechClient.java:270)
at com.logicvalley.translator.sample.TextReadCloudApi$2.doInBackground(TextReadCloudApi.java:97)
at com.logicvalley.translator.sample.TextReadCloudApi$2.doInBackground(TextReadCloudApi.java:67)
at android.os.AsyncTask$2.call(AsyncTask.java:333)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:245) 
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162) 
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636) 
at java.lang.Thread.run(Thread.java:764) 
8322


Please anyone give me a solution,



Advance thanks...










share|improve this question




























    1















    i am using TextToSpeechApi for read the text with multiple language & voices.
    But it show java.lang.AbstractMethodError: error on SynthesizeSpeechResponse
    line. How to solve this.



    My gradle :



    dependencies 
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:28.0.0'
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'

    implementation 'com.google.cloud:google-cloud-translate:1.65.0'
    // add these dependencies for the speech client
    implementation 'io.grpc:grpc-okhttp:1.10.0'
    implementation 'com.google.cloud:google-cloud-speech:0.53.0-alpha'
    implementation 'com.google.cloud:google-cloud-texttospeech:0.53.0-beta'

    implementation 'com.android.support:cardview-v7:28.0.0'
    implementation 'com.android.support:design:28.0.0'
    implementation 'com.android.support:recyclerview-v7:28.0.0'



    My Java Coding:



    public class TextReadCloudApi extends AppCompatActivity 

    private static final String TAG = "TextReadCloudApi";
    private TextToSpeechClient textToSpeechClient;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState)
    super.onCreate(savedInstanceState);
    setContentView(R.layout.text_read_api);

    Button button = (Button) findViewById(R.id.readBtn);

    button.setOnClickListener(new View.OnClickListener()
    @Override
    public void onClick(View v)
    Speak();

    );


    private void Speak()
    try
    final InputStream stream = getResources().openRawResource(R.raw.transcribeapi);
    ServiceAccountCredentials credentials = ServiceAccountCredentials.fromStream(stream);
    TextToSpeechSettings settings = TextToSpeechSettings.newBuilder()
    .setCredentialsProvider(FixedCredentialsProvider.create(credentials)).build();
    this.textToSpeechClient = TextToSpeechClient.create(settings);
    SetUp();
    catch (IOException e)
    e.printStackTrace();



    @SuppressLint("StaticFieldLeak")
    private void SetUp()

    new AsyncTask<Void, Void, Void>()
    @Override
    protected Void doInBackground(Void... params)
    // Set the text input to be synthesized
    SynthesisInput input = SynthesisInput.newBuilder()
    .setText("Hello, World!")
    .build();

    // Build the voice request, select the language code ("en-US") and the ssml voice gender
    // ("neutral")
    VoiceSelectionParams voice = VoiceSelectionParams.newBuilder()
    .setLanguageCode("en")
    .setSsmlGender(SsmlVoiceGender.FEMALE)
    .build();


    // Select the type of audio file you want returned
    AudioConfig audioConfig = AudioConfig.newBuilder()
    .setAudioEncoding(AudioEncoding.MP3)
    .build();

    SynthesizeSpeechRequest speechRequest=SynthesizeSpeechRequest.newBuilder()
    .setVoice(voice)
    .setAudioConfig(audioConfig)
    .setInput(input)
    .build();

    // Perform the text-to-speech request on the text input with the selected voice parameters and
    // audio file type
    if(!textToSpeechClient.isShutdown())
    SynthesizeSpeechResponse response=textToSpeechClient.synthesizeSpeech(speechRequest);
    // SynthesizeSpeechResponse response=textToSpeechClient.synthesizeSpeechCallable().call(speechRequest);
    // SynthesizeSpeechResponse response = textToSpeechClient.synthesizeSpeech(input, voice, audioConfig);

    // Get the audio contents from the response
    ByteString audioContents = response.getAudioContent();

    // Write the response to the output file.
    try
    OutputStream out = new FileOutputStream("output.mp3");
    out.write(audioContents.toByteArray());
    System.out.println("Audio content written to file "output.mp3"");
    Log.d(TAG, "SetUp: Audio content written to file");
    catch (Exception e)
    e.printStackTrace();


    return null;

    .execute();





    Error :



     Caused by: java.lang.AbstractMethodError: abstract method "com.google.api.gax.tracing.ApiTracer com.google.api.gax.rpc.ApiCallContext.getTracer()"
    at com.google.api.gax.retrying.BasicRetryingFuture.handleAttempt(BasicRetryingFuture.java:141)
    at com.google.api.gax.retrying.CallbackChainRetryingFuture$AttemptCompletionListener.handle(CallbackChainRetryingFuture.java:135)
    at com.google.api.gax.retrying.CallbackChainRetryingFuture$AttemptCompletionListener.run(CallbackChainRetryingFuture.java:117)
    at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:398)
    at com.google.common.util.concurrent.AbstractFuture.executeListener(AbstractFuture.java:1030)
    at com.google.common.util.concurrent.AbstractFuture.addListener(AbstractFuture.java:675)
    at com.google.common.util.concurrent.AbstractFuture$TrustedFuture.addListener(AbstractFuture.java:105)
    at com.google.common.util.concurrent.ForwardingListenableFuture.addListener(ForwardingListenableFuture.java:45)
    at com.google.api.gax.retrying.CallbackChainRetryingFuture.setAttemptFuture(CallbackChainRetryingFuture.java:93)
    at com.google.api.gax.rpc.AttemptCallable.call(AttemptCallable.java:89)
    at com.google.api.gax.rpc.RetryingCallable.futureCall(RetryingCallable.java:63)
    at com.google.api.gax.rpc.RetryingCallable.futureCall(RetryingCallable.java:41)
    at com.google.api.gax.rpc.UnaryCallable$1.futureCall(UnaryCallable.java:126)
    at com.google.api.gax.rpc.UnaryCallable.futureCall(UnaryCallable.java:87)
    at com.google.api.gax.rpc.UnaryCallable.call(UnaryCallable.java:112)
    at com.google.cloud.texttospeech.v1.TextToSpeechClient.synthesizeSpeech(TextToSpeechClient.java:270)
    at com.logicvalley.translator.sample.TextReadCloudApi$2.doInBackground(TextReadCloudApi.java:97)
    at com.logicvalley.translator.sample.TextReadCloudApi$2.doInBackground(TextReadCloudApi.java:67)
    at android.os.AsyncTask$2.call(AsyncTask.java:333)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:245) 
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162) 
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636) 
    at java.lang.Thread.run(Thread.java:764) 
    8322


    Please anyone give me a solution,



    Advance thanks...










    share|improve this question
























      1












      1








      1








      i am using TextToSpeechApi for read the text with multiple language & voices.
      But it show java.lang.AbstractMethodError: error on SynthesizeSpeechResponse
      line. How to solve this.



      My gradle :



      dependencies 
      implementation fileTree(dir: 'libs', include: ['*.jar'])
      implementation 'com.android.support:appcompat-v7:28.0.0'
      implementation 'com.android.support.constraint:constraint-layout:1.1.3'

      implementation 'com.google.cloud:google-cloud-translate:1.65.0'
      // add these dependencies for the speech client
      implementation 'io.grpc:grpc-okhttp:1.10.0'
      implementation 'com.google.cloud:google-cloud-speech:0.53.0-alpha'
      implementation 'com.google.cloud:google-cloud-texttospeech:0.53.0-beta'

      implementation 'com.android.support:cardview-v7:28.0.0'
      implementation 'com.android.support:design:28.0.0'
      implementation 'com.android.support:recyclerview-v7:28.0.0'



      My Java Coding:



      public class TextReadCloudApi extends AppCompatActivity 

      private static final String TAG = "TextReadCloudApi";
      private TextToSpeechClient textToSpeechClient;

      @Override
      protected void onCreate(@Nullable Bundle savedInstanceState)
      super.onCreate(savedInstanceState);
      setContentView(R.layout.text_read_api);

      Button button = (Button) findViewById(R.id.readBtn);

      button.setOnClickListener(new View.OnClickListener()
      @Override
      public void onClick(View v)
      Speak();

      );


      private void Speak()
      try
      final InputStream stream = getResources().openRawResource(R.raw.transcribeapi);
      ServiceAccountCredentials credentials = ServiceAccountCredentials.fromStream(stream);
      TextToSpeechSettings settings = TextToSpeechSettings.newBuilder()
      .setCredentialsProvider(FixedCredentialsProvider.create(credentials)).build();
      this.textToSpeechClient = TextToSpeechClient.create(settings);
      SetUp();
      catch (IOException e)
      e.printStackTrace();



      @SuppressLint("StaticFieldLeak")
      private void SetUp()

      new AsyncTask<Void, Void, Void>()
      @Override
      protected Void doInBackground(Void... params)
      // Set the text input to be synthesized
      SynthesisInput input = SynthesisInput.newBuilder()
      .setText("Hello, World!")
      .build();

      // Build the voice request, select the language code ("en-US") and the ssml voice gender
      // ("neutral")
      VoiceSelectionParams voice = VoiceSelectionParams.newBuilder()
      .setLanguageCode("en")
      .setSsmlGender(SsmlVoiceGender.FEMALE)
      .build();


      // Select the type of audio file you want returned
      AudioConfig audioConfig = AudioConfig.newBuilder()
      .setAudioEncoding(AudioEncoding.MP3)
      .build();

      SynthesizeSpeechRequest speechRequest=SynthesizeSpeechRequest.newBuilder()
      .setVoice(voice)
      .setAudioConfig(audioConfig)
      .setInput(input)
      .build();

      // Perform the text-to-speech request on the text input with the selected voice parameters and
      // audio file type
      if(!textToSpeechClient.isShutdown())
      SynthesizeSpeechResponse response=textToSpeechClient.synthesizeSpeech(speechRequest);
      // SynthesizeSpeechResponse response=textToSpeechClient.synthesizeSpeechCallable().call(speechRequest);
      // SynthesizeSpeechResponse response = textToSpeechClient.synthesizeSpeech(input, voice, audioConfig);

      // Get the audio contents from the response
      ByteString audioContents = response.getAudioContent();

      // Write the response to the output file.
      try
      OutputStream out = new FileOutputStream("output.mp3");
      out.write(audioContents.toByteArray());
      System.out.println("Audio content written to file "output.mp3"");
      Log.d(TAG, "SetUp: Audio content written to file");
      catch (Exception e)
      e.printStackTrace();


      return null;

      .execute();





      Error :



       Caused by: java.lang.AbstractMethodError: abstract method "com.google.api.gax.tracing.ApiTracer com.google.api.gax.rpc.ApiCallContext.getTracer()"
      at com.google.api.gax.retrying.BasicRetryingFuture.handleAttempt(BasicRetryingFuture.java:141)
      at com.google.api.gax.retrying.CallbackChainRetryingFuture$AttemptCompletionListener.handle(CallbackChainRetryingFuture.java:135)
      at com.google.api.gax.retrying.CallbackChainRetryingFuture$AttemptCompletionListener.run(CallbackChainRetryingFuture.java:117)
      at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:398)
      at com.google.common.util.concurrent.AbstractFuture.executeListener(AbstractFuture.java:1030)
      at com.google.common.util.concurrent.AbstractFuture.addListener(AbstractFuture.java:675)
      at com.google.common.util.concurrent.AbstractFuture$TrustedFuture.addListener(AbstractFuture.java:105)
      at com.google.common.util.concurrent.ForwardingListenableFuture.addListener(ForwardingListenableFuture.java:45)
      at com.google.api.gax.retrying.CallbackChainRetryingFuture.setAttemptFuture(CallbackChainRetryingFuture.java:93)
      at com.google.api.gax.rpc.AttemptCallable.call(AttemptCallable.java:89)
      at com.google.api.gax.rpc.RetryingCallable.futureCall(RetryingCallable.java:63)
      at com.google.api.gax.rpc.RetryingCallable.futureCall(RetryingCallable.java:41)
      at com.google.api.gax.rpc.UnaryCallable$1.futureCall(UnaryCallable.java:126)
      at com.google.api.gax.rpc.UnaryCallable.futureCall(UnaryCallable.java:87)
      at com.google.api.gax.rpc.UnaryCallable.call(UnaryCallable.java:112)
      at com.google.cloud.texttospeech.v1.TextToSpeechClient.synthesizeSpeech(TextToSpeechClient.java:270)
      at com.logicvalley.translator.sample.TextReadCloudApi$2.doInBackground(TextReadCloudApi.java:97)
      at com.logicvalley.translator.sample.TextReadCloudApi$2.doInBackground(TextReadCloudApi.java:67)
      at android.os.AsyncTask$2.call(AsyncTask.java:333)
      at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:245) 
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162) 
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636) 
      at java.lang.Thread.run(Thread.java:764) 
      8322


      Please anyone give me a solution,



      Advance thanks...










      share|improve this question














      i am using TextToSpeechApi for read the text with multiple language & voices.
      But it show java.lang.AbstractMethodError: error on SynthesizeSpeechResponse
      line. How to solve this.



      My gradle :



      dependencies 
      implementation fileTree(dir: 'libs', include: ['*.jar'])
      implementation 'com.android.support:appcompat-v7:28.0.0'
      implementation 'com.android.support.constraint:constraint-layout:1.1.3'

      implementation 'com.google.cloud:google-cloud-translate:1.65.0'
      // add these dependencies for the speech client
      implementation 'io.grpc:grpc-okhttp:1.10.0'
      implementation 'com.google.cloud:google-cloud-speech:0.53.0-alpha'
      implementation 'com.google.cloud:google-cloud-texttospeech:0.53.0-beta'

      implementation 'com.android.support:cardview-v7:28.0.0'
      implementation 'com.android.support:design:28.0.0'
      implementation 'com.android.support:recyclerview-v7:28.0.0'



      My Java Coding:



      public class TextReadCloudApi extends AppCompatActivity 

      private static final String TAG = "TextReadCloudApi";
      private TextToSpeechClient textToSpeechClient;

      @Override
      protected void onCreate(@Nullable Bundle savedInstanceState)
      super.onCreate(savedInstanceState);
      setContentView(R.layout.text_read_api);

      Button button = (Button) findViewById(R.id.readBtn);

      button.setOnClickListener(new View.OnClickListener()
      @Override
      public void onClick(View v)
      Speak();

      );


      private void Speak()
      try
      final InputStream stream = getResources().openRawResource(R.raw.transcribeapi);
      ServiceAccountCredentials credentials = ServiceAccountCredentials.fromStream(stream);
      TextToSpeechSettings settings = TextToSpeechSettings.newBuilder()
      .setCredentialsProvider(FixedCredentialsProvider.create(credentials)).build();
      this.textToSpeechClient = TextToSpeechClient.create(settings);
      SetUp();
      catch (IOException e)
      e.printStackTrace();



      @SuppressLint("StaticFieldLeak")
      private void SetUp()

      new AsyncTask<Void, Void, Void>()
      @Override
      protected Void doInBackground(Void... params)
      // Set the text input to be synthesized
      SynthesisInput input = SynthesisInput.newBuilder()
      .setText("Hello, World!")
      .build();

      // Build the voice request, select the language code ("en-US") and the ssml voice gender
      // ("neutral")
      VoiceSelectionParams voice = VoiceSelectionParams.newBuilder()
      .setLanguageCode("en")
      .setSsmlGender(SsmlVoiceGender.FEMALE)
      .build();


      // Select the type of audio file you want returned
      AudioConfig audioConfig = AudioConfig.newBuilder()
      .setAudioEncoding(AudioEncoding.MP3)
      .build();

      SynthesizeSpeechRequest speechRequest=SynthesizeSpeechRequest.newBuilder()
      .setVoice(voice)
      .setAudioConfig(audioConfig)
      .setInput(input)
      .build();

      // Perform the text-to-speech request on the text input with the selected voice parameters and
      // audio file type
      if(!textToSpeechClient.isShutdown())
      SynthesizeSpeechResponse response=textToSpeechClient.synthesizeSpeech(speechRequest);
      // SynthesizeSpeechResponse response=textToSpeechClient.synthesizeSpeechCallable().call(speechRequest);
      // SynthesizeSpeechResponse response = textToSpeechClient.synthesizeSpeech(input, voice, audioConfig);

      // Get the audio contents from the response
      ByteString audioContents = response.getAudioContent();

      // Write the response to the output file.
      try
      OutputStream out = new FileOutputStream("output.mp3");
      out.write(audioContents.toByteArray());
      System.out.println("Audio content written to file "output.mp3"");
      Log.d(TAG, "SetUp: Audio content written to file");
      catch (Exception e)
      e.printStackTrace();


      return null;

      .execute();





      Error :



       Caused by: java.lang.AbstractMethodError: abstract method "com.google.api.gax.tracing.ApiTracer com.google.api.gax.rpc.ApiCallContext.getTracer()"
      at com.google.api.gax.retrying.BasicRetryingFuture.handleAttempt(BasicRetryingFuture.java:141)
      at com.google.api.gax.retrying.CallbackChainRetryingFuture$AttemptCompletionListener.handle(CallbackChainRetryingFuture.java:135)
      at com.google.api.gax.retrying.CallbackChainRetryingFuture$AttemptCompletionListener.run(CallbackChainRetryingFuture.java:117)
      at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:398)
      at com.google.common.util.concurrent.AbstractFuture.executeListener(AbstractFuture.java:1030)
      at com.google.common.util.concurrent.AbstractFuture.addListener(AbstractFuture.java:675)
      at com.google.common.util.concurrent.AbstractFuture$TrustedFuture.addListener(AbstractFuture.java:105)
      at com.google.common.util.concurrent.ForwardingListenableFuture.addListener(ForwardingListenableFuture.java:45)
      at com.google.api.gax.retrying.CallbackChainRetryingFuture.setAttemptFuture(CallbackChainRetryingFuture.java:93)
      at com.google.api.gax.rpc.AttemptCallable.call(AttemptCallable.java:89)
      at com.google.api.gax.rpc.RetryingCallable.futureCall(RetryingCallable.java:63)
      at com.google.api.gax.rpc.RetryingCallable.futureCall(RetryingCallable.java:41)
      at com.google.api.gax.rpc.UnaryCallable$1.futureCall(UnaryCallable.java:126)
      at com.google.api.gax.rpc.UnaryCallable.futureCall(UnaryCallable.java:87)
      at com.google.api.gax.rpc.UnaryCallable.call(UnaryCallable.java:112)
      at com.google.cloud.texttospeech.v1.TextToSpeechClient.synthesizeSpeech(TextToSpeechClient.java:270)
      at com.logicvalley.translator.sample.TextReadCloudApi$2.doInBackground(TextReadCloudApi.java:97)
      at com.logicvalley.translator.sample.TextReadCloudApi$2.doInBackground(TextReadCloudApi.java:67)
      at android.os.AsyncTask$2.call(AsyncTask.java:333)
      at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:245) 
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162) 
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636) 
      at java.lang.Thread.run(Thread.java:764) 
      8322


      Please anyone give me a solution,



      Advance thanks...







      android google-text-to-speech abstractmethoderror






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 26 at 9:47









      Mathan ChinnaMathan Chinna

      15414 bronze badges




      15414 bronze badges






















          0






          active

          oldest

          votes










          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55354048%2fabstract-method-com-google-api-gax-tracing-apitracer-error-from-texttospeechap%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes




          Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.







          Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.



















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55354048%2fabstract-method-com-google-api-gax-tracing-apitracer-error-from-texttospeechap%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

          SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

          은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현